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
This commit is contained in:
Christopher Michael 2021-09-21 10:35:34 -04:00
parent 2c7b1a992c
commit 3f1d183c06
1 changed files with 1 additions and 1 deletions

View File

@ -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,