diff options
| author | 2014-08-06 03:07:35 +0200 | |
|---|---|---|
| committer | 2014-08-06 03:07:35 +0200 | |
| commit | 99d83b9017fb46eaeb9d7682fe263fced31c39a3 (patch) | |
| tree | 15d6e21b4dea64dcb29e3317cdf4a21e57295223 /common/utils.c | |
| parent | d56ad899e66b07b9a5f3cd802b2881ced1961011 (diff) | |
| download | libimobiledevice-99d83b9017fb46eaeb9d7682fe263fced31c39a3.tar.gz libimobiledevice-99d83b9017fb46eaeb9d7682fe263fced31c39a3.tar.bz2 | |
common/utils: Silence compiler warning about ignored return value from fread()
Diffstat (limited to 'common/utils.c')
| -rw-r--r-- | common/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/utils.c b/common/utils.c index 80f7060..0f65f4a 100644 --- a/common/utils.c +++ b/common/utils.c | |||
| @@ -161,7 +161,10 @@ void buffer_read_from_filename(const char *filename, char **buffer, uint64_t *le | |||
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | *buffer = (char*)malloc(sizeof(char)*(size+1)); | 163 | *buffer = (char*)malloc(sizeof(char)*(size+1)); |
| 164 | fread(*buffer, sizeof(char), size, f); | 164 | if (fread(*buffer, sizeof(char), size, f) != size) { |
| 165 | fclose(f); | ||
| 166 | return; | ||
| 167 | } | ||
| 165 | fclose(f); | 168 | fclose(f); |
| 166 | 169 | ||
| 167 | *length = size; | 170 | *length = size; |
