From: Jeremy F. <je...@go...> - 2003-04-17 08:24:00
|
Quoting Sebastian <sc...@nb...>: > This code looks correct to me. 'rand_fd' leads to /dev/urandom, so to > valgrind it should just look like if 'tmp' is defined by the read(), and > the > return value defined by the modulo operation. Only if you're sure that max is defined. Try scattering some VALGRIND_CHECK_DEFINED()s around to see what is actually a defined value where. BTW, this won't generate an even distribution from 0...max if that's what you need. J |