提交 0a24be21 编写于 作者: T Timo Teräs 提交者: Rich Felker

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.
上级 00733dd1
...@@ -10,7 +10,7 @@ FILE *setmntent(const char *name, const char *mode) ...@@ -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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册