From: Alejandro Colomar Date: Tue, 18 Feb 2025 14:43:29 +0000 (+0100) Subject: lib/strtoday.c: strtoday(): Remove obsolete comment X-Git-Tag: 4.18.0-rc1~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be719860537f698e2337eb7228ced278119bcdcb;p=thirdparty%2Fshadow.git lib/strtoday.c: strtoday(): Remove obsolete comment get_date() doesn't treat "" as a date anymore, so the comment is obsolete. We still need the code, though, as for example usermod(8) uses an empty string as a synonym for -1. Link: Reported-by: Chris Hofstaedtler Signed-off-by: Alejandro Colomar --- diff --git a/lib/strtoday.c b/lib/strtoday.c index cf77ca6fa..6e0e55c70 100644 --- a/lib/strtoday.c +++ b/lib/strtoday.c @@ -24,14 +24,8 @@ strtoday(const char *str) long d; time_t t; - /* - * get_date() interprets an empty string as the current date, - * which is not what we expect, unless you're a BOFH :-). - * (useradd sets sp_expire = current date for new lusers) - */ - if ((NULL == str) || streq(str, "")) { + if (NULL == str || streq(str, "")) return -1; - } /* If a numerical value is provided, this is already a number of * days since EPOCH.