Hello Wilfred,
Friday March 12 2021, Wilfred van Velzen wrote to andrew clarke:
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.
Yes, I know it. It was written long ago and not by me and I do not change it because I do not know whether free() always worked as it works now or it did not test the pointer for NULL in some ancient systems.
Michael
... node (at) f1042 (dot) ru
--- GoldED+/LNX 1.1.5-b20180707
* Origin: Moscow, Russia (2:5020/1042)
|