Fix: unused value
This commit is contained in:
parent
1c42f4036f
commit
584cba2bae
1 changed files with 2 additions and 2 deletions
|
@ -47,9 +47,9 @@ uint8_t* read_file(const char* path, size_t* size) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
fread(data, 1, statOfFile.st_size, f);
|
||||
size_t bytes_read = fread(data, 1, statOfFile.st_size, f);
|
||||
|
||||
if (ferror(f)) {
|
||||
if (bytes_read == 0 || ferror(f)) {
|
||||
fclose(f);
|
||||
if (errno == 0) errno = EIO;
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue