]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/getdate.y: Remove unnecessary variable
authorAlejandro Colomar <alx@kernel.org>
Tue, 18 Feb 2025 12:13:09 +0000 (13:13 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Wed, 30 Apr 2025 08:03:11 +0000 (10:03 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/getdate.y

index aff782d841a5abcc84925d5aac29f6d07495ac02..2801a30ebc958c28e8b1f2bfdc9d755685f754ff 100644 (file)
@@ -352,7 +352,6 @@ yylex (void)
 time_t get_date (const char *p, const time_t *now)
 {
   struct tm  tm;
-  time_t Start;
 
   yyInput = p;
   yyHaveDate = 0;
@@ -367,14 +366,7 @@ time_t get_date (const char *p, const time_t *now)
   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
   tm.tm_isdst = 0;
 
-  Start = timegm(&tm);
-
-  if (Start == (time_t) -1)
-    {
-       return Start;
-    }
-
-  return Start;
+  return timegm(&tm);
 }
 
 #if    defined (TEST)