trace: Fix void pointer arithmetic