[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix minor portability issues including ISO C 23 prototypes.
From: |
Collin Funk |
Subject: |
Re: [PATCH] Fix minor portability issues including ISO C 23 prototypes. |
Date: |
Wed, 14 Feb 2024 13:09:18 -0800 |
User-agent: |
Mozilla Thunderbird |
On 2/14/24 11:56 AM, Chet Ramey wrote:
> 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.
Oops, You're right. That's my bad. I think I saw a compiler for the
first comparison to zero in setenv () which is right above a NULL
return. I think the NULL looks more clear but that is probably just
personal preference. :)
Collin