avoid computing 0 offsets from null pointers
avoid computing 0 offsets from null pointers

Similar work in the kernel:
https://patchwork.kernel.org/patch/11351499/

UBsan (+clang-10) complains about doing pointer arithmetic (adding 0)
to a nullpointer.

This patch is tested with clang-10+ubsan

unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso