summaryrefslogtreecommitdiffstats
path: root/contrib/libucl/tests/test_basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libucl/tests/test_basic.c')
-rw-r--r--contrib/libucl/tests/test_basic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/libucl/tests/test_basic.c b/contrib/libucl/tests/test_basic.c
index 0834728..5a977aa 100644
--- a/contrib/libucl/tests/test_basic.c
+++ b/contrib/libucl/tests/test_basic.c
@@ -78,7 +78,9 @@ main (int argc, char **argv)
while (!feof (in)) {
memset (inbuf, 0, sizeof (inbuf));
- (void)fread (inbuf, sizeof (inbuf) - 1, 1, in);
+ if (fread (inbuf, 1, sizeof (inbuf) - 1, in) == 0) {
+ break;
+ }
inlen = strlen (inbuf);
test_in = malloc (inlen);
memcpy (test_in, inbuf, inlen);
OpenPOWER on IntegriCloud