diff --git a/ui/mtr.c b/ui/mtr.c index b33a1368..44660824 100644 --- a/ui/mtr.c +++ b/ui/mtr.c @@ -693,7 +693,7 @@ static void init_rand( struct timeval tv; gettimeofday(&tv, NULL); - srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec); + srand(((getpid() & 0xffff) << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec); }