startrek: use time(NULL)
authorAlan Cox <alan@linux.intel.com>
Sun, 11 Mar 2018 20:57:49 +0000 (20:57 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 11 Mar 2018 20:57:49 +0000 (20:57 +0000)
Applications/games/startrek.c

index 70b6342..d11f15f 100644 (file)
@@ -1780,9 +1780,7 @@ int getline(char *s)
 /* Seed the randomizer with the timer */
 void randomize(void)
 {
-       time_t timer;
-
-       srand((unsigned) time(&timer));
+       srand((unsigned) time(NULL));
 }
 
 /* Returns an integer from 1 to iSpread */