Cast to ptrdiff_t instead of subtracting by null
Subtraction by a null pointer is done to get a ptrdiff_t. However, this is undefined behavior, so it's been replaced with a cast to ptrdiff_t.
Subtraction by a null pointer is done to get a ptrdiff_t. However, this is undefined behavior, so it's been replaced with a cast to ptrdiff_t.