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:
Alejandro Colomar 2021-12-14 12:40:06 +01:00
parent 9a9c9231db
commit e2f1fcca0e

View File

@ -1073,7 +1073,6 @@ static void process_flags (int argc, char **argv)
}
break;
case 'e':
if ('\0' != *optarg) {
user_newexpire = strtoday (optarg);
if (user_newexpire < -1) {
fprintf (stderr,
@ -1082,9 +1081,6 @@ static void process_flags (int argc, char **argv)
exit (E_BAD_ARG);
}
user_newexpire *= DAY / SCALE;
} else {
user_newexpire = -1;
}
eflg = true;
break;
case 'f':