changeset 4855:bc6212d7fab1

Remove no longer relevant code. Found by LLVM static analyzer.
author William Pitcock <nenolod@atheme.org>
date Thu, 16 Apr 2009 19:57:44 -0500
parents 23cc350969e6
children 49574e8c4d0b
files src/audlegacy/pluginenum.c
diffstat 1 files changed, 35 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/src/audlegacy/pluginenum.c	Thu Apr 16 19:49:20 2009 -0500
+++ b/src/audlegacy/pluginenum.c	Thu Apr 16 19:57:44 2009 -0500
@@ -1032,16 +1032,16 @@
 
     for (node = get_input_list(); node; node = g_list_next(node)) {
         ip = INPUT_PLUGIN(node->data);
-        if (ip && ip->cleanup) {
+        if (ip) {
 	    plugin_set_current((Plugin *)ip);
-            ip->cleanup();
+
+            if (ip->cleanup)
+                ip->cleanup();
+
             GDK_THREADS_LEAVE();
             while (g_main_context_iteration(NULL, FALSE));
             GDK_THREADS_ENTER();
         }
-
-        if (ip->handle)
-            g_module_close(ip->handle);
     }
 
     if (ip_data.input_list != NULL)
@@ -1052,16 +1052,16 @@
 
     for (node = get_output_list(); node; node = g_list_next(node)) {
         op = OUTPUT_PLUGIN(node->data);
-        if (op && op->cleanup) {
+        if (op) {
 	    plugin_set_current((Plugin *)op);
-            op->cleanup();
+
+            if (op->cleanup)
+                op->cleanup();
+
             GDK_THREADS_LEAVE();
             while (g_main_context_iteration(NULL, FALSE));
             GDK_THREADS_ENTER();
         }
-
-        if (op->handle)
-            g_module_close(op->handle);
     }
 
     if (op_data.output_list != NULL)
@@ -1072,16 +1072,16 @@
 
     for (node = get_effect_list(); node; node = g_list_next(node)) {
         ep = EFFECT_PLUGIN(node->data);
-        if (ep && ep->cleanup) {
+        if (ep) {
 	    plugin_set_current((Plugin *)ep);
-            ep->cleanup();
+
+            if (ep->cleanup)
+                ep->cleanup();
+
             GDK_THREADS_LEAVE();
             while (g_main_context_iteration(NULL, FALSE));
             GDK_THREADS_ENTER();
         }
-
-        if (ep->handle)
-            g_module_close(ep->handle);
     }
 
     if (ep_data.effect_list != NULL)
@@ -1092,16 +1092,16 @@
 
     for (node = get_general_list(); node; node = g_list_next(node)) {
         gp = GENERAL_PLUGIN(node->data);
-        if (gp && gp->cleanup) {
+        if (gp) {
 	    plugin_set_current((Plugin *)gp);
-            gp->cleanup();
+
+            if (gp->cleanup)
+                gp->cleanup();
+
             GDK_THREADS_LEAVE();
             while (g_main_context_iteration(NULL, FALSE));
             GDK_THREADS_ENTER();
         }
-
-        if (gp->handle)
-            g_module_close(gp->handle);
     }
 
     if (gp_data.general_list != NULL)
@@ -1112,16 +1112,16 @@
 
     for (node = get_vis_list(); node; node = g_list_next(node)) {
         vp = VIS_PLUGIN(node->data);
-        if (vp && vp->cleanup) {
+        if (vp) {
 	    plugin_set_current((Plugin *)vp);
-            vp->cleanup();
+
+            if (vp->cleanup)
+                vp->cleanup();
+
             GDK_THREADS_LEAVE();
             while (g_main_context_iteration(NULL, FALSE));
             GDK_THREADS_ENTER();
         }
-
-        if (vp->handle)
-            g_module_close(vp->handle);
     }
 
     if (vp_data.vis_list != NULL)
@@ -1133,16 +1133,16 @@
 
     for (node = get_discovery_list(); node; node = g_list_next(node)) {
         dp = DISCOVERY_PLUGIN(node->data);
-        if (dp && dp->cleanup) {
+        if (dp) {
 	    plugin_set_current((Plugin *)dp);
-            dp->cleanup();
+
+            if (dp->cleanup)
+                dp->cleanup();
+
             GDK_THREADS_LEAVE();
             while (g_main_context_iteration(NULL, FALSE));
             GDK_THREADS_ENTER();
         }
-
-        if (dp->handle)
-            g_module_close(dp->handle);
     }
 
     if (dp_data.discovery_list != NULL)
@@ -1151,20 +1151,18 @@
         dp_data.discovery_list = NULL;
     }
 
-
-
     for (node = lowlevel_list; node; node = g_list_next(node)) {
         lp = LOWLEVEL_PLUGIN(node->data);
-        if (lp && lp->cleanup) {
+        if (lp) {
 	    plugin_set_current((Plugin *)lp);
-            lp->cleanup();
+
+            if (lp->cleanup)
+                lp->cleanup();
+
             GDK_THREADS_LEAVE();
             while (g_main_context_iteration(NULL, FALSE));
             GDK_THREADS_ENTER();
         }
-
-        if (lp->handle)
-            g_module_close(lp->handle);
     }
 
     if (lowlevel_list != NULL)