make endmntent function handle null argument
The function originates from SunOS 4.x in which the null argument is allowed. glibc also handles this case.
This commit is contained in:
parent
00733dd1cf
commit
0a24be213a
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ FILE *setmntent(const char *name, const char *mode)
|
||||||
|
|
||||||
int endmntent(FILE *f)
|
int endmntent(FILE *f)
|
||||||
{
|
{
|
||||||
fclose(f);
|
if (f) fclose(f);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue