diff options
| author | tholo <> | 1996-09-15 09:31:53 +0000 | 
|---|---|---|
| committer | tholo <> | 1996-09-15 09:31:53 +0000 | 
| commit | 27b62657a94b21845fcea14320c285cb5b1a2800 (patch) | |
| tree | 947900ef381c1a838cf05f934ed5349615aac605 /src/lib/libc/stdlib/random.c | |
| parent | 5db356f3a7b6b461177c41660da527087e8d4399 (diff) | |
| download | openbsd-27b62657a94b21845fcea14320c285cb5b1a2800.tar.gz openbsd-27b62657a94b21845fcea14320c285cb5b1a2800.tar.bz2 openbsd-27b62657a94b21845fcea14320c285cb5b1a2800.zip  | |
Remove dead code
Remove unused variables
Silence some warnings
lint(1) is your friend
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/random.c | 5 | 
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/random.c b/src/lib/libc/stdlib/random.c index de7cc3cf44..46b67b5ec7 100644 --- a/src/lib/libc/stdlib/random.c +++ b/src/lib/libc/stdlib/random.c  | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | */ | 32 | */ | 
| 33 | 33 | ||
| 34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) | 
| 35 | static char *rcsid = "$OpenBSD: random.c,v 1.3 1996/08/19 08:33:46 tholo Exp $"; | 35 | static char *rcsid = "$OpenBSD: random.c,v 1.4 1996/09/15 09:31:51 tholo Exp $"; | 
| 36 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ | 
| 37 | 37 | ||
| 38 | #include <stdio.h> | 38 | #include <stdio.h> | 
| @@ -193,13 +193,12 @@ srandom(x) | |||
| 193 | u_int x; | 193 | u_int x; | 
| 194 | { | 194 | { | 
| 195 | register long int test; | 195 | register long int test; | 
| 196 | register int i, j; | 196 | register int i; | 
| 197 | ldiv_t val; | 197 | ldiv_t val; | 
| 198 | 198 | ||
| 199 | if (rand_type == TYPE_0) | 199 | if (rand_type == TYPE_0) | 
| 200 | state[0] = x; | 200 | state[0] = x; | 
| 201 | else { | 201 | else { | 
| 202 | j = 1; | ||
| 203 | state[0] = x; | 202 | state[0] = x; | 
| 204 | for (i = 1; i < rand_deg; i++) { | 203 | for (i = 1; i < rand_deg; i++) { | 
| 205 | /* | 204 | /* | 
