The compiler will realise that:
assert(assert(line != NULL && longest != NULL && "memory error");
assert(line != NULL && longest != NULL);
(That doesn't make these particular asserts an error).
http://c.learncodethehardway.org/book/learn-c-the-hard-waych...
#ifdef NDEBUG #define assert(e) ((void)0) #else #define assert(e) \ ((void) ((e) ? 0 : __assert (#e, __FILE__, __LINE__))) #define __assert(e, file, line) \ ((void)printf ("%s:%u: failed assertion `%s'\n", file, line, e), abort())
The compiler will realise that:
Is equivalent to: But there doesn't seem anything wrong with that.