提交 3fd1acbf 编写于 作者: M Michael Forney 提交者: Rich Felker

putgrent: Add missing newline

上级 a3b98a11
......@@ -9,6 +9,7 @@ int putgrent(const struct group *gr, FILE *f)
if ((r = fprintf(f, "%s:%s:%d:", gr->gr_name, gr->gr_passwd, gr->gr_gid))<0) goto done;
if (gr->gr_mem) for (i=0; gr->gr_mem[i]; i++)
if ((r = fprintf(f, "%s%s", i?",":"", gr->gr_mem[i]))<0) goto done;
r = fputc('\n', f);
done:
funlockfile(f);
return r<0 ? -1 : 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册