In the case:
if ((x = malloc(len)) == 0) {
        --- error code
if (!(x = malloc(len))) {
        --- error code
The C standard treats 0 as a special case. Many times one might find many 
cases where NULL is defined as plain 0, not (void *)0 or 0L. It is more 
correct to test a pointer to equality or inequality rather than to negate 
it.

tom r wrote:

> Oops, you are exactly right, my mistake.  strcmp returns an int and therefor
> its return value is never (correctly) evaluated in a pointer context. 
> 
> Pick a function that does return a char* and the rest of my statement (I thin
> k)
> holds true. 
-- 
Jerry Feldman <[EMAIL PROTECTED]>
Boston Linux and Unix user group
http://www.blu.org



**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to