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

Andreas Schwab schwab@linux-m68k.org
Tue Jan 18 14:22:35 GMT 2022


On Jan 18 2022, xuyang2018.jy@fujitsu.com wrote:

> Now, I use glibc-2.34 and run the following program[1] but the errno is 
> not 0 in the beginning. So is this a known bug on glibc-2.34(Theodore 
> doesn't meet this problem on glicb-2.31)?
>
> [1]https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/src/ext4_resize.c

Note that there is a call to open preceding the strtoull call, so no
guarantees can be made about the value of errno before the latter.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list