gst/goom/goomsl.c: Check return value of fread() to avoid compiler warnings.

Original commit message from CVS:
* gst/goom/goomsl.c: (gsl_read_file):
Check return value of fread() to avoid compiler warnings.
This commit is contained in:
Tim-Philipp Müller 2008-04-02 15:42:27 +00:00
parent 7964bd1ed8
commit e2c672da7b
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2008-04-02 Tim-Philipp Müller <tim at centricular dot net>
* gst/goom/goomsl.c: (gsl_read_file):
Check return value of fread() to avoid compiler warnings.
2008-04-01 Wim Taymans <wim.taymans@collabora.co.uk> 2008-04-01 Wim Taymans <wim.taymans@collabora.co.uk>
Based on patch by: mersad <mersad at axis dot com> Based on patch by: mersad <mersad at axis dot com>

2
common

@ -1 +1 @@
Subproject commit 4221e9dcb05faa6f6f7ba19bba32fe90da4577dd Subproject commit 5421815aeed8b2d73a4d4d4a4b8eb2c93f1b7d02

View file

@ -1609,7 +1609,9 @@ gsl_read_file (const char *fname)
fsize = ftell (f); fsize = ftell (f);
rewind (f); rewind (f);
buffer = (char *) malloc (fsize + 512); buffer = (char *) malloc (fsize + 512);
fread (buffer, 1, fsize, f); if (fread (buffer, 1, fsize, f) != fsize) {
buffer[0] = '\0';
}
fclose (f); fclose (f);
buffer[fsize] = 0; buffer[fsize] = 0;
return buffer; return buffer;