From 3f1d183c06c78b22f4270d752e88e8dbaa89a015 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 21 Sep 2021 10:35:34 -0400 Subject: [PATCH] eina-test: Fix unchecked return value Coverity CID1401015 complains about an unchecked return value here, so let's check that fread actually succeeded (return > 0). Fixes CID1401015 @fix --- src/tests/eina/eina_test_simple_xml_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/eina/eina_test_simple_xml_parser.c b/src/tests/eina/eina_test_simple_xml_parser.c index 34c8d69002..5f41d2b038 100644 --- a/src/tests/eina/eina_test_simple_xml_parser.c +++ b/src/tests/eina/eina_test_simple_xml_parser.c @@ -237,7 +237,7 @@ EFL_START_TEST(eina_simple_xml_parser_parse_with_custom_callback) if (buf) { - if (fread(buf, 1, sz, f)) + if (fread(buf, 1, sz, f) > 0) { int parse_current_state = simple_xml_parser_current_state_begin; eina_simple_xml_parse(buf,