]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/fclose.c.patch
1f6be87d2b71a9134cebe5f880e1e2c87954546b
[apple/libc.git] / stdio / FreeBSD / fclose.c.patch
1 Index: fclose.c
2 ===================================================================
3 RCS file: /cvs/root/Libc/stdio/FreeBSD/fclose.c,v
4 retrieving revision 1.2
5 diff -u -d -b -w -p -r1.2 fclose.c
6 --- fclose.c 2003/05/20 22:22:40 1.2
7 +++ fclose.c 2005/02/14 21:57:28
8 @@ -53,6 +53,10 @@ fclose(FILE *fp)
9 {
10 int r;
11
12 + if (fp == NULL) {
13 + errno = EFAULT;
14 + return (EOF);
15 + }
16 if (fp->_flags == 0) { /* not open! */
17 errno = EBADF;
18 return (EOF);