[patch] burncd: honour for envar SPEED

Dag-Erling Smørgrav des at des.no
Tue Nov 10 20:13:45 UTC 2009


Alexander Best <alexbestms at 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 - des at des.no


More information about the freebsd-hackers mailing list