diff --git a/usr.bin/shuffle/shuffle.c b/usr.bin/shuffle/shuffle.c index d1fa8138ac8a..429c0f481c38 100644 --- a/usr.bin/shuffle/shuffle.c +++ b/usr.bin/shuffle/shuffle.c @@ -1,4 +1,4 @@ -/* $NetBSD: shuffle.c,v 1.21 2011/09/16 15:39:29 joerg Exp $ */ +/* $NetBSD: shuffle.c,v 1.22 2017/02/06 02:26:44 dholland Exp $ */ /* * Copyright (c) 1998 @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: shuffle.c,v 1.21 2011/09/16 15:39:29 joerg Exp $"); +__RCSID("$NetBSD: shuffle.c,v 1.22 2017/02/06 02:26:44 dholland Exp $"); #endif /* not lint */ #include @@ -73,7 +73,7 @@ get_shuffle(size_t t) */ for (j = t - 1; j > 0; j--) { - k = arc4random() % (j + 1); + k = arc4random_uniform(j + 1); temp = shuffle[j]; shuffle[j] = shuffle[k]; shuffle[k] = temp;