svn commit: r297407 - head/lib/libc/stdio
Pedro F. Giffuni
pfg at FreeBSD.org
Wed Mar 30 01:32:09 UTC 2016
Author: pfg
Date: Wed Mar 30 01:32:08 2016
New Revision: 297407
URL: https://svnweb.freebsd.org/changeset/base/297407
Log:
freopen(3): prevent uninitialized errno.
The case doesn't look very likely but clean the possibility nevertheless
CID: 1018720
MFC after: 1 week
Modified:
head/lib/libc/stdio/freopen.c
Modified: head/lib/libc/stdio/freopen.c
==============================================================================
--- head/lib/libc/stdio/freopen.c Wed Mar 30 01:08:08 2016 (r297406)
+++ head/lib/libc/stdio/freopen.c Wed Mar 30 01:32:08 2016 (r297407)
@@ -66,7 +66,8 @@ freopen(const char * __restrict file, co
(void) fclose(fp);
errno = sverrno;
return (NULL);
- }
+ } else
+ sverrno = 0;
FLOCKFILE(fp);
More information about the svn-src-all
mailing list