* the line is invalid.
*/
- if ((NULL != cp) || (i != FIELDS)) {
+ if (NULL != cp || i != FIELDS)
return 0;
- }
sgroup.sg_name = fields[0];
sgroup.sg_passwd = fields[1];
return NULL;
}
- if (fgetsx (buf, buflen, fp) == buf)
- {
+ if (fgetsx(buf, buflen, fp) == buf) {
while ( ((cp = strrchr (buf, '\n')) == NULL)
&& (feof (fp) == 0)) {
size_t len;
if (fields[2][0] == '\0') {
spwd.sp_lstchg = -1;
} else {
- if (getlong(fields[2], &spwd.sp_lstchg) == -1) {
- return 0;
- } else if (spwd.sp_lstchg < 0) {
+ if (getlong(fields[2], &spwd.sp_lstchg) == -1)
+ return 0;
+ if (spwd.sp_lstchg < 0)
return 0;
- }
}
/*
if (fields[3][0] == '\0') {
spwd.sp_min = -1;
} else {
- if (getlong(fields[3], &spwd.sp_min) == -1) {
- {
- return 0;
- }
- } else if (spwd.sp_min < 0) {
+ if (getlong(fields[3], &spwd.sp_min) == -1)
+ return 0;
+ if (spwd.sp_min < 0)
return 0;
- }
}
/*
if (fields[4][0] == '\0') {
spwd.sp_max = -1;
} else {
- if (getlong(fields[4], &spwd.sp_max) == -1) {
- return 0;
- } else if (spwd.sp_max < 0) {
+ if (getlong(fields[4], &spwd.sp_max) == -1)
+ return 0;
+ if (spwd.sp_max < 0)
return 0;
- }
}
/*
if (fields[5][0] == '\0') {
spwd.sp_warn = -1;
} else {
- if (getlong(fields[5], &spwd.sp_warn) == -1) {
- {
- return 0;
- }
- } else if (spwd.sp_warn < 0) {
+ if (getlong(fields[5], &spwd.sp_warn) == -1)
+ return 0;
+ if (spwd.sp_warn < 0)
return 0;
- }
}
/*
if (fields[6][0] == '\0') {
spwd.sp_inact = -1;
} else {
- if (getlong(fields[6], &spwd.sp_inact) == -1) {
- {
- return 0;
- }
- } else if (spwd.sp_inact < 0) {
+ if (getlong(fields[6], &spwd.sp_inact) == -1)
+ return 0;
+ if (spwd.sp_inact < 0)
return 0;
- }
}
/*
if (fields[7][0] == '\0') {
spwd.sp_expire = -1;
} else {
- if (getlong(fields[7], &spwd.sp_expire) == -1) {
- {
- return 0;
- }
- } else if (spwd.sp_expire < 0) {
+ if (getlong(fields[7], &spwd.sp_expire) == -1)
+ return 0;
+ if (spwd.sp_expire < 0)
return 0;
- }
}
/*
if (fields[8][0] == '\0') {
spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
} else {
- if (getulong(fields[8], &spwd.sp_flag) == -1) {
- {
- return 0;
- }
- } else if (spwd.sp_flag < 0) {
+ if (getulong(fields[8], &spwd.sp_flag) == -1)
+ return 0;
+ if (spwd.sp_flag < 0)
return 0;
- }
}
return (&spwd);