28c28
< __FBSDID("$FreeBSD: head/games/random/randomize_fd.c 181412 2008-08-08 02:46:47Z ache $");
---
> __FBSDID("$FreeBSD: head/games/random/randomize_fd.c 181527 2008-08-10 11:31:56Z ache $");
51c51
< n = (struct rand_node *)malloc(sizeof(struct rand_node));
---
> n = (struct rand_node *)calloc(1, sizeof(struct rand_node));
53c53
< err(1, "malloc");
---
> err(1, "calloc");
55,57d54
< n->len = 0;
< n->cp = NULL;
< n->next = NULL;
178c175
< if (numnode == RANDOM_MAX) {
---
> if (numnode == RANDOM_MAX_PLUS1) {
180c177
< err(1, "too many lines");
---
> err(1, "too many delimiters");
218c215
< if ((int)(denom * random() / RANDOM_MAX) == 0) {
---
> if ((int)(denom * random() / RANDOM_MAX_PLUS1) == 0) {
< __FBSDID("$FreeBSD: head/games/random/randomize_fd.c 181412 2008-08-08 02:46:47Z ache $");
---
> __FBSDID("$FreeBSD: head/games/random/randomize_fd.c 181527 2008-08-10 11:31:56Z ache $");
51c51
< n = (struct rand_node *)malloc(sizeof(struct rand_node));
---
> n = (struct rand_node *)calloc(1, sizeof(struct rand_node));
53c53
< err(1, "malloc");
---
> err(1, "calloc");
55,57d54
< n->len = 0;
< n->cp = NULL;
< n->next = NULL;
178c175
< if (numnode == RANDOM_MAX) {
---
> if (numnode == RANDOM_MAX_PLUS1) {
180c177
< err(1, "too many lines");
---
> err(1, "too many delimiters");
218c215
< if ((int)(denom * random() / RANDOM_MAX) == 0) {
---
> if ((int)(denom * random() / RANDOM_MAX_PLUS1) == 0) {