diff options
Diffstat (limited to 'usr.sbin/pw/grupd.c')
-rw-r--r-- | usr.sbin/pw/grupd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pw/grupd.c b/usr.sbin/pw/grupd.c index 237fe95..edff76d 100644 --- a/usr.sbin/pw/grupd.c +++ b/usr.sbin/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); |