usermod: Remove special case for ""
That special case is already handled by the called function: strtoday() so we can simplify the calling code. Link: <https://github.com/shadow-maint/shadow/issues/454> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
This commit is contained in:
parent
9a9c9231db
commit
e2f1fcca0e
@ -1073,7 +1073,6 @@ static void process_flags (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
if ('\0' != *optarg) {
|
|
||||||
user_newexpire = strtoday (optarg);
|
user_newexpire = strtoday (optarg);
|
||||||
if (user_newexpire < -1) {
|
if (user_newexpire < -1) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
@ -1082,9 +1081,6 @@ static void process_flags (int argc, char **argv)
|
|||||||
exit (E_BAD_ARG);
|
exit (E_BAD_ARG);
|
||||||
}
|
}
|
||||||
user_newexpire *= DAY / SCALE;
|
user_newexpire *= DAY / SCALE;
|
||||||
} else {
|
|
||||||
user_newexpire = -1;
|
|
||||||
}
|
|
||||||
eflg = true;
|
eflg = true;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
|
Loading…
Reference in New Issue
Block a user