From fcc5e80cec3aaded855b8dd7da3752c3b5664db8 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 20 Jul 2014 06:54:00 +0000 Subject: [PATCH] iscsi-scst: Suppress a compiler warning (merge r5614 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x@5696 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/chap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iscsi-scst/usr/chap.c b/iscsi-scst/usr/chap.c index 287210a1f..a54309be4 100644 --- a/iscsi-scst/usr/chap.c +++ b/iscsi-scst/usr/chap.c @@ -344,7 +344,8 @@ static int chap_rand(void) fd = open("/dev/urandom", O_RDONLY); assert(fd != -1); - (void)read(fd, &r, sizeof(r)); + if (read(fd, &r, sizeof(r)) < sizeof(r)) { + } close(fd); return r; }