Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/random Pass lint(1).



details:   https://anonhg.NetBSD.org/src/rev/01e53a3e4793
branches:  trunk
changeset: 583526:01e53a3e4793
user:      rpaulo <rpaulo%NetBSD.org@localhost>
date:      Wed Aug 10 14:02:26 2005 +0000

description:
Pass lint(1).

diffstat:

 games/random/random.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r d5f8e854a52d -r 01e53a3e4793 games/random/random.c
--- a/games/random/random.c     Wed Aug 10 14:02:10 2005 +0000
+++ b/games/random/random.c     Wed Aug 10 14:02:26 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: random.c,v 1.9 2004/01/27 20:30:30 jsm Exp $   */
+/*     $NetBSD: random.c,v 1.10 2005/08/10 14:02:26 rpaulo Exp $       */
 
 /*
  * Copyright (c) 1994
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)random.c   8.6 (Berkeley) 6/1/94";
 #else
-__RCSID("$NetBSD: random.c,v 1.9 2004/01/27 20:30:30 jsm Exp $");
+__RCSID("$NetBSD: random.c,v 1.10 2005/08/10 14:02:26 rpaulo Exp $");
 #endif
 #endif /* not lint */
 
@@ -109,7 +109,7 @@
        }
 
        (void)gettimeofday(&tp, NULL);
-       srandom((u_int)(tp.tv_usec + tp.tv_sec + getpid()));
+       srandom((unsigned long)tp.tv_usec + tp.tv_sec + getpid());
 
        /* Compute a random exit status between 0 and denom - 1. */
        if (random_exit)
@@ -144,6 +144,8 @@
        if (ferror(stdin))
                err(2, "stdin");
        exit (0);
+
+       return 0;
 }
 
 void



Home | Main Index | Thread Index | Old Index