summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-04 09:58:32 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-04 09:59:36 +0100
commit91bf465d52db7270d3644e6eb22acb0e29da8d67 (patch)
treead162b7b3d75ebf8379752b86cfe4d45bdc7189e /src/bin/eolian
parent8f30d8a94956f7a18e4c79ea834137157adaa927 (diff)
eolian/generator: coverity fix
Fixes CID 1229130 (ignoring number of bytes read)
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 5be48ff549..2b66a8917f 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -67,7 +67,8 @@ _read_file(char *filename, Eina_Strbuf *buffer)
67 ERR("Couldnt allocate memory for file %s", filename); 67 ERR("Couldnt allocate memory for file %s", filename);
68 goto end; 68 goto end;
69 } 69 }
70 if (!fread(content, file_size, 1, fd)) 70 long actual_size = (long)fread(content, file_size, 1, fd);
71 if (actual_size != file_size)
71 { 72 {
72 ERR("Couldnt read the %ld bytes of file %s", file_size, filename); 73 ERR("Couldnt read the %ld bytes of file %s", file_size, filename);
73 free(content); 74 free(content);