This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC V2 [1/2] test-in-container
- From: DJ Delorie <dj at redhat dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 27 Feb 2018 16:17:23 -0500
- Subject: Re: RFC V2 [1/2] test-in-container
- Authentication-results: sourceware.org; auth=none
Andreas Schwab <schwab@linux-m68k.org> writes:
>> + printf ("unable to open %s for reading\n", sname);
>> + perror ("the error was");
>
> That doesn't work, the printf call can clobber errno. Use error instead.
Weird, I've been using that idiom for decades and never had that happen.
But, I'll put it on the list of things to change for V3.
Thanks!