diff --git a/regress/netcat.c b/regress/netcat.c index 0acedfd82..c62111780 100644 --- a/regress/netcat.c +++ b/regress/netcat.c @@ -1134,7 +1134,7 @@ build_ports(char *p) char *c; for (x = 0; x <= (hi - lo); x++) { - y = (arc4random() & 0xFFFF) % (hi - lo); + y = arc4random_uniform(hi - lo); c = portlist[x]; portlist[x] = portlist[y]; portlist[y] = c;