summaryrefslogtreecommitdiffstats
path: root/pw/grupd.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw/grupd.c')
-rw-r--r--pw/grupd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pw/grupd.c b/pw/grupd.c
index 237fe95..edff76d 100644
--- a/pw/grupd.c
+++ b/pw/grupd.c
@@ -142,8 +142,9 @@ gr_update(struct group * grp, char const * group, int mode)
if (grp != NULL && fmtgrentry(&grbuf, &grbuflen, grp, PWF_PASSWD) == -1)
l = -1;
else {
- if ((l = fileupdate(getgrpath(_GROUP), 0644, grbuf, pfx, l, mode)) != 0)
- l = grdb(NULL) == 0;
+ l = fileupdate(getgrpath(_GROUP), 0644, grbuf, pfx, l, mode);
+ if (l == 0)
+ l = grdb(NULL);
}
if (grbuf != NULL)
free(grbuf);