]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/getdate.y: NULL doesn't need a cast
authorAlejandro Colomar <alx@kernel.org>
Tue, 14 May 2024 17:49:39 +0000 (19:49 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 2 Jul 2024 02:40:11 +0000 (21:40 -0500)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/getdate.y

index 8cea2cc4df3b04aa45b036422579e8ad489f3974..b71bf1984a698dd4b35281da545198ad56369209 100644 (file)
@@ -821,7 +821,7 @@ time_t get_date (const char *p, const time_t *now)
   time_t Start;
 
   yyInput = p;
-  Start = now ? *now : time ((time_t *) NULL);
+  Start = now ? *now : time(NULL);
   tmp = localtime (&Start);
   yyYear = tmp->tm_year + TM_YEAR_ORIGIN;
   yyMonth = tmp->tm_mon + 1;
@@ -935,7 +935,7 @@ main(void)
   buff[MAX_BUFF_LEN] = 0;
   while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
     {
-      d = get_date (buff, (time_t *) NULL);
+      d = get_date(buff, NULL);
       if (d == -1)
        (void) printf ("Bad format - couldn't convert.\n");
       else