summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-12-29 13:05:03 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-02 10:34:47 +0100
commitd7f43c6018b3f8be3053281c279681278fe269f1 (patch)
tree7b85411a77bcdadf8c3a3c567af38e21f19fc8b6
parente419703cd51c0da28dd84593ce55c184217d5c39 (diff)
examples: fix eina_simple_xml_parser
-rw-r--r--src/examples/eina/eina_simple_xml_parser_01.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/examples/eina/eina_simple_xml_parser_01.c b/src/examples/eina/eina_simple_xml_parser_01.c
index 0ad4ec3b85..824537c3b2 100644
--- a/src/examples/eina/eina_simple_xml_parser_01.c
+++ b/src/examples/eina/eina_simple_xml_parser_01.c
@@ -29,9 +29,15 @@ main(void)
29 size = ftell(file); 29 size = ftell(file);
30 fseek(file, 0, SEEK_SET); 30 fseek(file, 0, SEEK_SET);
31 31
32 if (size < 0)
33 {
34 EINA_LOG_ERR("Can't read chat.xml");
35 return 0;
36 }
37
32 if ((buffer = malloc(size))) 38 if ((buffer = malloc(size)))
33 { 39 {
34 if (fread(buffer, 1, size, file) != size) 40 if (fread(buffer, 1, size, file) != (unsigned long)size)
35 { 41 {
36 EINA_LOG_ERR("Can't read chat.xml"); 42 EINA_LOG_ERR("Can't read chat.xml");
37 } 43 }