Subject: Re: Is fclose(NULL) defined?
To: Callum Gibson <callum@frost.bain.oz.au>
From: Perry E. Metzger <perry@piermont.com>
List: current-users
Date: 09/12/1995 23:18:58
Callum Gibson writes:
> :-)Yes, but IMHO libc should error-check stuff, even simple null pointer
> :-)checks would save a lot of hassles.
> 
> If it's going to error-check stuff like that it should do it with asserts.
> To silently allow bad code like fclose(NULL) is simply encouraging bad
> programming.

Asserts are bad because they only are on if the program is
appropriately compiled. A simple "if (foo) abort();" is far better.

.pm