From: R.E. Wolff Date: Mon, 25 May 2026 18:03:14 +0000 (+0200) Subject: fixed rand init a bit to use more bits of the pid X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f032ffc28e01caefddd11fd7df881804e41e4f5b;p=thirdparty%2Fmtr.git fixed rand init a bit to use more bits of the pid --- diff --git a/ui/mtr.c b/ui/mtr.c index de47683..c3b66b0 100644 --- a/ui/mtr.c +++ b/ui/mtr.c @@ -830,7 +830,7 @@ static void init_rand( struct timeval tv; gettimeofday(&tv, NULL); - srand(((getpid() & 0xffff) << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec); + srand((getpid() ^ (getuid() << 16) ^ tv.tv_sec ^ tv.tv_usec); } /*