diff options
| -rw-r--r-- | usr/src/cmd/passwd/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/cmd/passwd/passwd.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/usr/src/cmd/passwd/Makefile b/usr/src/cmd/passwd/Makefile index d53cad2cd6..561357a16c 100644 --- a/usr/src/cmd/passwd/Makefile +++ b/usr/src/cmd/passwd/Makefile @@ -33,10 +33,6 @@ lint := LDLIBS += -lpasswdutil LDFLAGS += $(ZIGNORE) LDLIBS += -lbsm -lpam -lnsl -CERRWARN += -_gcc=-Wno-switch -CERRWARN += -_gcc=-Wno-parentheses -CERRWARN += -_gcc=-Wno-uninitialized - FILEMODE = 06555 XGETFLAGS += -a -x $(PROG).xcl diff --git a/usr/src/cmd/passwd/passwd.c b/usr/src/cmd/passwd/passwd.c index 851de6f237..7d993f681b 100644 --- a/usr/src/cmd/passwd/passwd.c +++ b/usr/src/cmd/passwd/passwd.c @@ -236,7 +236,7 @@ main(int argc, char *argv[]) int updated_reps; - if (prognamep = strrchr(argv[0], '/')) + if ((prognamep = strrchr(argv[0], '/')) != NULL) ++prognamep; else prognamep = argv[0]; @@ -1240,10 +1240,10 @@ get_attr(char *username, pwu_repository_t *repository, attrlist **attributes) void display_attr(char *usrname, attrlist *attributes) { - char *status; + char *status = NULL; char *passwd; long lstchg; - int min, max, warn; + int min = 0, max = 0, warn = 0; while (attributes) { switch (attributes->type) { @@ -1275,6 +1275,8 @@ display_attr(char *usrname, attrlist *attributes) case ATTR_WARN: warn = attributes->data.val_i; break; + default: + break; } attributes = attributes->next; } |
