[easytag] Fix cddb.c unused result warnings, bug 699979



commit 656c87bbc6d225e1a4926099ca93e346855712d5
Author: Abhinav <abhijangda hotmail com>
Date:   Thu May 9 20:06:20 2013 +0100

    Fix cddb.c unused result warnings, bug 699979

 src/cddb.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/cddb.c b/src/cddb.c
index e313171..a568b99 100644
--- a/src/cddb.c
+++ b/src/cddb.c
@@ -1633,7 +1633,13 @@ Cddb_Write_Result_To_File (gint socket_id, gulong *bytes_read_total)
 
             // Write to file
             cddb_out[bytes_read] = 0;
-            fwrite(&cddb_out,bytes_read,1,file);
+            if (fwrite (&cddb_out, bytes_read, 1, file) != 1)
+            {
+                 Log_Print (LOG_ERROR,
+                            _("Error while writing CDDB results to file '%s'"),
+                            file_path);
+                 break;
+            }
 
             *bytes_read_total += bytes_read;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]