From a84547ed0af681dba4b629b348a21187b26636ce Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Wed, 29 May 2024 14:23:10 -0500 Subject: [PATCH] plugin: Remove pointless if statement cp has to be valid here, no need to check it. Signed-off-by: Corey Minyard --- lib/src/clixon_plugin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/src/clixon_plugin.c b/lib/src/clixon_plugin.c index fe2b00fa..5baa0e86 100644 --- a/lib/src/clixon_plugin.c +++ b/lib/src/clixon_plugin.c @@ -377,10 +377,8 @@ plugin_load_one(clixon_handle h, /* Copy name to struct */ snprintf(cp->cp_name, sizeof(cp->cp_name), "%s", name); cp->cp_api = *api; - if (cp){ - *cpp = cp; - cp = NULL; - } + *cpp = cp; + cp = NULL; retval = 1; done: clixon_debug(CLIXON_DBG_INIT | CLIXON_DBG_DETAIL, "retval:%d", retval);