summaryrefslogtreecommitdiffstats
path: root/games/random/random.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2008-08-11 23:24:42 +0000
committerache <ache@FreeBSD.org>2008-08-11 23:24:42 +0000
commit2e0fd6b4c3050b7765ca05851c99123e1e74856e (patch)
treedf8b2f870814f902229ceb8d2f2d9b94e108a7ac /games/random/random.c
parenta130c67d80d1513591530a63e2985b17d19204b5 (diff)
downloadFreeBSD-src-2e0fd6b4c3050b7765ca05851c99123e1e74856e.zip
FreeBSD-src-2e0fd6b4c3050b7765ca05851c99123e1e74856e.tar.gz
Suggections from bde@
1) Split too long source lines 2) Portable code should not assume that null pointer == all-bits-0, so back out prev. calloc() change. Submitted by: bde
Diffstat (limited to 'games/random/random.c')
-rw-r--r--games/random/random.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/games/random/random.c b/games/random/random.c
index 2580348..c1be97b 100644
--- a/games/random/random.c
+++ b/games/random/random.c
@@ -180,7 +180,8 @@ main(int argc, char *argv[])
err(2, "stdout");
/* Now see if the next line is to be printed. */
- selected = (int)(denom * random() / RANDOM_MAX_PLUS1) == 0;
+ selected = (int)(denom * random() /
+ RANDOM_MAX_PLUS1) == 0;
}
}
if (ferror(stdin))
OpenPOWER on IntegriCloud