gst/goom/goomsl.c: Check return value of fread() to avoid compiler warnings.
authorTim-Philipp Müller <tim@centricular.net>
Wed, 2 Apr 2008 15:42:27 +0000 (15:42 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 2 Apr 2008 15:42:27 +0000 (15:42 +0000)
Original commit message from CVS:
* gst/goom/goomsl.c: (gsl_read_file):
Check return value of fread() to avoid compiler warnings.

ChangeLog
common
gst/goom/goomsl.c

index 7c4c418..1de3528 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        Based on patch by: mersad <mersad at axis dot com>
diff --git a/common b/common
index 4221e9d..5421815 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 4221e9dcb05faa6f6f7ba19bba32fe90da4577dd
+Subproject commit 5421815aeed8b2d73a4d4d4a4b8eb2c93f1b7d02
index 759be10..6f40775 100644 (file)
@@ -1609,7 +1609,9 @@ gsl_read_file (const char *fname)
   fsize = ftell (f);
   rewind (f);
   buffer = (char *) malloc (fsize + 512);
-  fread (buffer, 1, fsize, f);
+  if (fread (buffer, 1, fsize, f) != fsize) {
+    buffer[0] = '\0';
+  }
   fclose (f);
   buffer[fsize] = 0;
   return buffer;