Closed Shnatsel closed 6 years ago
@PlasmaPower GitHub won't let me add you as a reviewer, but I'd appreciate if you could take a look.
To get a null pointer, use ptr::null_mut()
. Instead of putting the rest of the code in an else statement, I'd use an early return.
Thanks! ptr::null_mut()
is much better.
I rather like the else statement to make it obvious that the function returns something either way. That might be baggage from dynamically typed languages, IDK.
This is the behavior that POSIX prescribes and libdiffuzz-c99 already implements
Thanks to InaneB0b on Reddit for pointing this out