[easytag] Return 0 from et_get_file_size() on error



commit 240bc63b4f67d98cf94f55a7a385b5a9dd0e100b
Author: David King <amigadave amigadave com>
Date:   Sat Feb 8 23:11:13 2014 +0000

    Return 0 from et_get_file_size() on error
    
    Found by Coverity (CID 1170175).

 src/misc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/misc.c b/src/misc.c
index 83107d6..a5ccf31 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1125,7 +1125,7 @@ et_get_file_size (const gchar *filename)
     /* TODO: Take a GError from the caller. */
     GError *error = NULL;
 
-    g_return_if_fail (filename != NULL);
+    g_return_val_if_fail (filename != NULL, 0);
 
     file = g_file_new_for_path (filename);
     info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE,


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