summaryrefslogtreecommitdiffstats
path: root/pw/pwupd.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw/pwupd.c')
-rw-r--r--pw/pwupd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/pwupd.c b/pw/pwupd.c
index ec29b9e..67a816f 100644
--- a/pw/pwupd.c
+++ b/pw/pwupd.c
@@ -166,7 +166,7 @@ pw_update(struct passwd * pwd, char const * user, int mode)
else
fmtpwentry(pwbuf, pwd, PWF_PASSWD);
- if (l == -1)
+ if (l < 0)
l = 0;
rc = fileupdate(getpwpath(_PASSWD), 0644, pwbuf, pfx, l, mode);
if (rc == 0) {