On 2/14/24 12:26 AM, Collin Funk wrote:
Hi, I noticed some compiler warnings that might be worth fixing. I wasn't sure if patches should have ChangeLog entries so I left it alone and tried to make it easy to copy paste for you. Feel free to use or ignore changes as you see fit.
Thanks for the patches.
* lib/sh/getenv.c (getenv, putenv, setenv, unsetenv): Don't assume that NULL is equivalent to 0 and just use the macro itself.
This isn't necessary in general; ISO C guarantees that a constant expression with value 0 is a null pointer constant just like NULL, and the compiler will make them equivalent even if the internal representation of a null pointer isn't all zeroes. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/