]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/getdate.y: Don't parse a raw number; just a calendar date
authorAlejandro Colomar <alx@kernel.org>
Tue, 18 Feb 2025 14:29:54 +0000 (15:29 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Wed, 30 Apr 2025 08:03:11 +0000 (10:03 +0200)
Our caller, strtoday(), already handles a raw number.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/getdate.y

index 835791d26e29f2eb9b952a5211c8b019c2b288db..c0df43428da18333b2918c6cf77d3cdeea7ce550 100644 (file)
@@ -132,7 +132,6 @@ spec        : /* NULL */
        ;
 
 item   : date
-       | number
        ;
 
 date   : tUNUMBER tSNUMBER tSNUMBER {
@@ -143,14 +142,6 @@ date       : tUNUMBER tSNUMBER tSNUMBER {
        }
        ;
 
-number : tUNUMBER
-          {
-                   yyDay= ($1)%100;
-                   yyMonth= ($1/100)%100;
-                   yyYear = $1/10000;
-         }
-       ;
-
 %%
 
 \f