Whamcloud - gitweb
LU-6081 lib: don't ignore the return of read() 54/13654/2
authorFrank Zago <fzago@cray.com>
Wed, 4 Feb 2015 21:31:31 +0000 (15:31 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Mar 2015 00:12:10 +0000 (00:12 +0000)
commit432dc1efa71e56e364b07c9cd0d0ba1feffadce1
tree142e1a2c42ab8265a10da437a6ebb73ba9e5326c
parentf27a9e92b2507a18872008f49f9bf0e09009f1cc
LU-6081 lib: don't ignore the return of read()

The return of read() must be checked on some platform, possibly with a
recent version of glibc. Otherwise this gives an "ignoring return
value of 'read'" warning, which breaks the build. It happens on Ubuntu
14.04.

Use the return of read() to the random entropy to fix the issue. This
doesn't do much for the entropy, but it doesn't hurt either.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: Iee7c1bce818e2f163db8f860acf8be075f5a543e
Reviewed-on: http://review.whamcloud.com/13654
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/utils/liblustreapi_util.c