[easytag/wip/clang-analyzer: 2/7] Add missing g_return_if_fail() calls



commit 1184c35156dfb51e235fec427d99e80a9e15cfb9
Author: David King <amigadave amigadave com>
Date:   Sat Aug 10 22:51:30 2013 +0100

    Add missing g_return_if_fail() calls
    
    Found with the Clang static analyzer.

 src/browser.c |    1 +
 src/misc.c    |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 26181af..5eb8b35 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -4235,6 +4235,7 @@ Run_Program (const gchar *program_name, GList *args_list)
     GList *l;
     gchar *program_path;
 
+    g_return_val_if_fail (program_name != NULL && args_list != NULL, FALSE);
 
     /* Check if a name for the program have been supplied */
     if (!program_name || strlen(program_name)<1)
diff --git a/src/misc.c b/src/misc.c
index 41e473f..f477204 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -762,6 +762,8 @@ Run_Audio_Player_Using_File_List (GList *etfilelist)
     gint    argv_user_number;
 #endif /* !G_OS_WIN32 */
 
+    g_return_if_fail (etfilelist != NULL);
+
     // Exit if no program selected...
     if (!AUDIO_FILE_PLAYER || strlen(g_strstrip(AUDIO_FILE_PLAYER))<1)
     {


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