examples: fix eina_simple_xml_parser

This commit is contained in:
Marcel Hollerbach 2018-12-29 13:05:03 +01:00
parent e419703cd5
commit d7f43c6018
1 changed files with 7 additions and 1 deletions

View File

@ -29,9 +29,15 @@ main(void)
size = ftell(file);
fseek(file, 0, SEEK_SET);
if (size < 0)
{
EINA_LOG_ERR("Can't read chat.xml");
return 0;
}
if ((buffer = malloc(size)))
{
if (fread(buffer, 1, size, file) != size)
if (fread(buffer, 1, size, file) != (unsigned long)size)
{
EINA_LOG_ERR("Can't read chat.xml");
}