Re: [PATCH] src/ext4_resize.c: set errno to 0 before the strtoull call

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




On 18/01/2022 09:04, Andreas Schwab wrote:
> On Jan 18 2022, Adhemerval Zanella wrote:
> 
>> I think this is a implementation detail, I am not aware that either C or
>> POSIX now states it should initialized to any specific value (in fact, 
>> POSIX at Issue 5 [1] has removed the 'The value of errno is 0 at program 
>> start-up' on its description).
> 
> It's still part of the C standard, though.
> 

And I think it is error-prone, since it requires caller to handle two 
different assumptions (whether the function is called after program 
initialization or after errno might be clobbered).



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux