plugin: Remove pointless if statement

cp has to be valid here, no need to check it.

Signed-off-by: Corey Minyard <minyard@acm.org>
This commit is contained in:
Corey Minyard 2024-05-29 14:23:10 -05:00 committed by Olof Hagsand
parent c94ca6179f
commit a84547ed0a

View file

@ -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;
}
retval = 1;
done:
clixon_debug(CLIXON_DBG_INIT | CLIXON_DBG_DETAIL, "retval:%d", retval);