From ea9e664fc9c31964de6f34ce0275c1900dc7548f Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 22 Mar 2011 09:05:26 +0000 Subject: [PATCH] Coverity 420 Remove dead code and add a g_assert_not_reached() at a spot we can definitely never reach. change a if(x)g_free(x) to a g_free(x) since g_free(NULL) is just a nop. svn path=/trunk/; revision=36238 --- plugins/mate/mate_runtime.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/mate/mate_runtime.c b/plugins/mate/mate_runtime.c index f9e4544dc4..1a66763788 100644 --- a/plugins/mate/mate_runtime.c +++ b/plugins/mate/mate_runtime.c @@ -445,18 +445,15 @@ static void analyze_gop(mate_gop* gop) { break; } - /** XXX: Can't get here because of "breaks" above; Incorrect code someplace ?? */ - delete_avpl(gogkey_match,TRUE); - gogkey_match = NULL; + /** Can't get here because of "breaks" above */ + g_assert_not_reached(); } - if (key) g_free(key); - key = NULL; - dbg_print (dbg_gog,1,dbg_facility,"analyze_gop: no gogkey_match: %s",key); } /* while */ - if (key) g_free(key); + g_free(key); + key = NULL; if (gogkey_match) delete_avpl(gogkey_match,TRUE);