eolian/generator: coverity fix

Fixes CID 1229130 (ignoring number of bytes read)
This commit is contained in:
Daniel Kolesa 2014-08-04 09:58:32 +01:00
parent 8f30d8a949
commit 91bf465d52
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ _read_file(char *filename, Eina_Strbuf *buffer)
ERR("Couldnt allocate memory for file %s", filename);
goto end;
}
if (!fread(content, file_size, 1, fd))
long actual_size = (long)fread(content, file_size, 1, fd);
if (actual_size != file_size)
{
ERR("Couldnt read the %ld bytes of file %s", file_size, filename);
free(content);