X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/blobdiff_plain/5cc3dcbb4b1ff86e884ca90d654447e83c91ac8f..0dc92c2de5173e7bcbfafa2fbbfa13226eabfe28:/pw/grupd.c 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);