]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
silence broken compiler
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 28 Feb 2008 03:22:26 +0000 (03:22 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 28 Feb 2008 03:22:26 +0000 (03:22 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7764 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/formats/mod_shout/mod_shout.c

index 5afb63ada21ecc9b5fcbe5d3e811ebd3c6e2dac0..d947d2a522667345aeaebe07b46f312ecd1dd867 100644 (file)
@@ -74,6 +74,8 @@ static size_t decode_fd(shout_context_t * context, void *data, size_t bytes);
 
 static inline void free_context(shout_context_t * context)
 {
+       int ret;
+
        if (context) {
                context->err++;
 
@@ -87,7 +89,10 @@ static inline void free_context(shout_context_t * context)
                        int len;
 
                        while ((len = lame_encode_flush(context->gfp, mp3buffer, sizeof(mp3buffer))) > 0) {
-                               fwrite(mp3buffer, 1, len, context->fp);
+                               ret = fwrite(mp3buffer, 1, len, context->fp);
+                               if (ret < 0) {
+                                       break;
+                               }
                        }
 
                        lame_mp3_tags_fid(context->gfp, context->fp);
@@ -857,7 +862,8 @@ static switch_status_t shout_file_write(switch_file_handle_t *handle, void *data
         }
 
                if (rlen) {
-                       if (fwrite(mp3buf, 1, rlen, context->fp) < 0) {
+                       int ret = fwrite(mp3buf, 1, rlen, context->fp);
+                       if (ret < 0) {
                                return SWITCH_STATUS_FALSE;
                        }
                }