summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pw/pwupd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pw/pwupd.c b/pw/pwupd.c
index 0483be1..84226a9 100644
--- a/pw/pwupd.c
+++ b/pw/pwupd.c
@@ -111,7 +111,8 @@ fmtpwentry(char *buf, struct passwd * pwd, int type)
int l;
char *pw;
- pw = (pwd->pw_passwd == NULL || !*pwd->pw_passwd) ? "" : (type == PWF_MASTER) ? pwd->pw_passwd : "*";
+ pw = (type == PWF_MASTER) ?
+ ((pwd->pw_passwd == NULL) ? "" : pwd->pw_passwd) : "*";
if (type == PWF_PASSWD)
l = sprintf(buf, "%s:*:%ld:%ld:%s:%s:%s\n",