comparison usr/src/cmd/passwd/passwd.c @ 14136:9178198c46b5

4026 cleanup warnings in cmd/passwd Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Cedric Blancher <cedric.blancher@gmail.com> Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com> Approved by: Robert Mustacchi <rm@joyent.com>
author Igor Kozhukhov <ikozhukhov@gmail.com>
date Tue, 13 Aug 2013 09:02:40 -0700
parents f6cca4323de0
children
comparison
equal deleted inserted replaced
14135:62094c23dbe2 14136:9178198c46b5
234 char *input; 234 char *input;
235 int tries = 1; 235 int tries = 1;
236 int updated_reps; 236 int updated_reps;
237 237
238 238
239 if (prognamep = strrchr(argv[0], '/')) 239 if ((prognamep = strrchr(argv[0], '/')) != NULL)
240 ++prognamep; 240 ++prognamep;
241 else 241 else
242 prognamep = argv[0]; 242 prognamep = argv[0];
243 243
244 auth_rep.type = NULL; 244 auth_rep.type = NULL;
1238 * onto standand output. 1238 * onto standand output.
1239 */ 1239 */
1240 void 1240 void
1241 display_attr(char *usrname, attrlist *attributes) 1241 display_attr(char *usrname, attrlist *attributes)
1242 { 1242 {
1243 char *status; 1243 char *status = NULL;
1244 char *passwd; 1244 char *passwd;
1245 long lstchg; 1245 long lstchg;
1246 int min, max, warn; 1246 int min = 0, max = 0, warn = 0;
1247 1247
1248 while (attributes) { 1248 while (attributes) {
1249 switch (attributes->type) { 1249 switch (attributes->type) {
1250 case ATTR_PASSWD: 1250 case ATTR_PASSWD:
1251 passwd = attributes->data.val_s; 1251 passwd = attributes->data.val_s;
1273 max = attributes->data.val_i; 1273 max = attributes->data.val_i;
1274 break; 1274 break;
1275 case ATTR_WARN: 1275 case ATTR_WARN:
1276 warn = attributes->data.val_i; 1276 warn = attributes->data.val_i;
1277 break; 1277 break;
1278 default:
1279 break;
1278 } 1280 }
1279 attributes = attributes->next; 1281 attributes = attributes->next;
1280 } 1282 }
1281 (void) fprintf(stdout, "%-8s ", usrname); 1283 (void) fprintf(stdout, "%-8s ", usrname);
1282 1284