Alexander Best <alexbes...@wwu.de> writes:
> you're right. hundreds of functions cause segfaults when arg or args
> are NULL.  either we add safety checks for all of them (massive
> overhead) or just leave them the way they are.

The consensus in the C community is that adding such checks does more
harm than good, because a NULL pointer is usually a symptom of a bug
somewhere else in the application, and checking for a NULL pointer will
either hide that bug or trigger another error somewhere down the line,
possibly making the real bug harder to find, rather than easier.

(next week's topic: the return value of malloc(0)...)

DES
-- 
Dag-Erling Smørgrav - d...@des.no
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to