summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <habets@google.com>2019-11-01 17:23:31 +0000
committerThomas Habets <habets@google.com>2019-11-01 17:23:31 +0000
commitb1df66491af36baf2b05e3386c8e1a996f6cccb2 (patch)
tree4db0867d4f92cfb703dc6609726d1996952c4ee3
parent1322eeab7c338a0645e1baf2813a96ebeb1f8fc1 (diff)
downloadarping-b1df66491af36baf2b05e3386c8e1a996f6cccb2.tar.gz
Switch from rand() to random()
random() has better pseudorandom promises. Not that we need it for security, but why not use the better one since it exists.
-rw-r--r--src/arping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arping.c b/src/arping.c
index 5642598..aae839c 100644
--- a/src/arping.c
+++ b/src/arping.c
@@ -2107,7 +2107,7 @@ arping_main(int argc, char **argv)
} else { /* PINGMAC */
int c;
for (c = 0; (maxcount < 0 || c < maxcount) && !time_to_die; c++) {
- pingmac_send(rand(), c);
+ pingmac_send(random(), c);
const uint32_t w = wait_time(deadline, packetwait);
if (w == 0) {
break;