'item' is always NULLed-out by VIR_APPEND_ELEMENT and 'ret' variable is always 0 when used so both can be removed. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/security/security_selinux.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 30fb6028aa..9ff35a7be5 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -114,7 +114,6 @@ virSecuritySELinuxContextListAppend(virSecuritySELinuxContextList *list, bool remember, bool restore) { - int ret = -1; virSecuritySELinuxContextItem *item = NULL; item = g_new0(virSecuritySELinuxContextItem, 1); @@ -127,9 +126,7 @@ virSecuritySELinuxContextListAppend(virSecuritySELinuxContextList *list, VIR_APPEND_ELEMENT(list->items, list->nItems, item); - ret = 0; - virSecuritySELinuxContextItemFree(item); - return ret; + return 0; } static void -- 2.31.1