aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorKarl Heuer1995-05-30 03:15:27 +0000
committerKarl Heuer1995-05-30 03:15:27 +0000
commite2d6972aefdd044e150173a3d32ac2904252db8d (patch)
tree70203e8cdf280ba6d547094d20f4dade2c4427bc /src/fns.c
parent6c6a9be863aafe0507b199e375c0e04208693573 (diff)
downloademacs-e2d6972aefdd044e150173a3d32ac2904252db8d.tar.gz
emacs-e2d6972aefdd044e150173a3d32ac2904252db8d.zip
(Frandom): Use EMACS_INT, not int.
Use NULL, not 0, as arg of `time'.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fns.c b/src/fns.c
index e060f027e83..1510930c9c1 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -60,11 +60,12 @@ With argument t, set the random number seed from the current time and pid.")
60 (limit) 60 (limit)
61 Lisp_Object limit; 61 Lisp_Object limit;
62{ 62{
63 int val; 63 EMACS_INT val;
64 Lisp_Object lispy_val;
64 unsigned long denominator; 65 unsigned long denominator;
65 66
66 if (EQ (limit, Qt)) 67 if (EQ (limit, Qt))
67 seed_random (getpid () + time (0)); 68 seed_random (getpid () + time (NULL));
68 if (NATNUMP (limit) && XFASTINT (limit) != 0) 69 if (NATNUMP (limit) && XFASTINT (limit) != 0)
69 { 70 {
70 /* Try to take our random number from the higher bits of VAL, 71 /* Try to take our random number from the higher bits of VAL,
@@ -81,7 +82,8 @@ With argument t, set the random number seed from the current time and pid.")
81 } 82 }
82 else 83 else
83 val = get_random (); 84 val = get_random ();
84 return make_number (val); 85 XSETINT (lispy_val, val);
86 return lispy_val;
85} 87}
86 88
87/* Random data-structure functions */ 89/* Random data-structure functions */