[Olsr-dev] [PATCH v1 1/1] main: improve random number generator seed

Roar Bjørgum Rotvik (spam-protected)
Tue Nov 13 08:11:53 CET 2012


On 11/10/2012 11:50 AM, Ferry Huberts wrote:
> From: Ferry Huberts <(spam-protected)>
> +    if (read(randomFile, &seed, sizeof(seed)) != sizeof(seed)) {
> +      ; /* to fix an 'unused result' compiler warning */
> +    }

Wouldn't this code line be nicer and easier to understand than the code
above (if you ignore the result from read() anyhow)?

(void)read(randomFile, &seed, sizeof(seed));

-- 
Roar B. Rotvik





More information about the Olsr-dev mailing list