projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00733dd
)
make endmntent function handle null argument
author
Timo Teräs
<timo.teras@iki.fi>
Wed, 6 Aug 2014 11:15:15 +0000
(14:15 +0300)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 8 Aug 2014 04:45:10 +0000
(
00:45
-0400)
The function originates from SunOS 4.x in which the null argument
is allowed. glibc also handles this case.
src/misc/mntent.c
patch
|
blob
|
history
diff --git
a/src/misc/mntent.c
b/src/misc/mntent.c
index 3eafba5e0b387ce98e0aefde2bbdaf8288757af9..a16d65254d5042df3de28ff29dc719ccecc76bc5 100644
(file)
--- a/
src/misc/mntent.c
+++ b/
src/misc/mntent.c
@@
-10,7
+10,7
@@
FILE *setmntent(const char *name, const char *mode)
int endmntent(FILE *f)
{
- fclose(f);
+
if (f)
fclose(f);
return 1;
}