Subj : Re: Htick Hatching To : Michael Dukelsky From : Wilfred van Velzen Date : Fri Mar 12 2021 13:52:18 Hi Michael, On 2021-03-12 15:30:48, you wrote to me: ac>>> #define nfree(a) {if(a != NULL) {free(a); a = NULL;}} WV>> And the test for NULL isn't necessary, because free() is by definition WV>> doing nothing if the pointer passed to it is NULL. MD> Yes, I know it. It was written long ago and not by me and I do not change MD> it because I do not know whether free() always worked as it works now or it MD> did not test the pointer for NULL in some ancient systems. The Second Edition (1988) of The C Programming Language by Kernighan & Ritchie (describes C as defined by the ANSI standard), already describes it as follows: void free(void *p) free deallocates the space pointed to by p; it does nothing if p is NULL. p must be a pointer to space previously allocated by calloc, malloc, or realloc. So I think you are save to assume it "always" worked that way! ;) Bye, Wilfred. --- FMail-lnx64 2.1.0.18-B20170815 * Origin: FMail development HQ (2:280/464) .