changeset 12008:637671248a31

(Frandom): Use EMACS_INT, not int. Use NULL, not 0, as arg of `time'.
author Karl Heuer <kwzh@gnu.org>
date Tue, 30 May 1995 03:15:27 +0000
parents 4179378fa410
children 29adc0df831d
files src/fns.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Mon May 29 21:04:07 1995 +0000
+++ b/src/fns.c	Tue May 30 03:15:27 1995 +0000
@@ -60,11 +60,12 @@
   (limit)
      Lisp_Object limit;
 {
-  int val;
+  EMACS_INT val;
+  Lisp_Object lispy_val;
   unsigned long denominator;
 
   if (EQ (limit, Qt))
-    seed_random (getpid () + time (0));
+    seed_random (getpid () + time (NULL));
   if (NATNUMP (limit) && XFASTINT (limit) != 0)
     {
       /* Try to take our random number from the higher bits of VAL,
@@ -81,7 +82,8 @@
     }
   else
     val = get_random ();
-  return make_number (val);
+  XSETINT (lispy_val, val);
+  return lispy_val;
 }
 
 /* Random data-structure functions */