RE: freeing NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Nicholas & Cedric, I stand corrected.  (The C compilers I used predated the C89 standard, since I had last used C in 1989.)

>From C89, I (now) expect that C++ would handle free(NULL) without problem.  And I will henceforth cease my "if (p) free(p);" guard, since the if-guard is superfluous.

Sincerely,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux