X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Fliblustreapi_util.c;h=efd9d3c916ae2f88bff7c7ae5e7ef5fd5c6adca9;hb=85cbe1a3ee6940f7468884bca43cd736a5365694;hp=329f0e439856a5698aa74a0fbb11aec3d8283902;hpb=31e7f22cdc7c77ac7b48ba6a258ca9611063320a;p=fs%2Flustre-release.git diff --git a/lustre/utils/liblustreapi_util.c b/lustre/utils/liblustreapi_util.c index 329f0e4..efd9d3c 100644 --- a/lustre/utils/liblustreapi_util.c +++ b/lustre/utils/liblustreapi_util.c @@ -67,9 +67,10 @@ static __attribute__ ((constructor)) void liblustreapi_init(void) fd = open("/dev/urandom", O_RDONLY | O_NOFOLLOW); if (fd >= 0) { unsigned int rnumber; + ssize_t ret; - (void)read(fd, &rnumber, sizeof(rnumber)); - seed ^= rnumber; + ret = read(fd, &rnumber, sizeof(rnumber)); + seed ^= rnumber ^ ret; close(fd); }