diff options
Diffstat (limited to 'plugins/check_by_ssh.c')
-rw-r--r-- | plugins/check_by_ssh.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 405f1c2b..627b876b 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c @@ -94,12 +94,8 @@ main (int argc, char **argv) /* Wait a random amount of time */ if (random_wait_max) { - uint8_t random = 0; - int fd = open("/dev/urandom", O_RDONLY); - read(fd, &random, sizeof(uint8_t)); - close(fd); - - sleep( (random_wait_max * random) / 255 ); + srand(time(NULL)); + sleep(random() % random_wait_max); } /* Set signal handling and alarm timeout */ |