mirror of git://git.musl-libc.org/musl
putgrent: Add missing newline
This commit is contained in:
parent
a3b98a11a9
commit
3fd1acbfee
|
@ -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 ((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 (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;
|
if ((r = fprintf(f, "%s%s", i?",":"", gr->gr_mem[i]))<0) goto done;
|
||||||
|
r = fputc('\n', f);
|
||||||
done:
|
done:
|
||||||
funlockfile(f);
|
funlockfile(f);
|
||||||
return r<0 ? -1 : 0;
|
return r<0 ? -1 : 0;
|
||||||
|
|
Loading…
Reference in New Issue