From 6a3df1342b957f0293c7a9f05b3037dff3156487 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 15 Nov 2023 15:32:56 +0100 Subject: Remove a redundant NULL check `info` cannot be NULL, and if it was it'd already have crashed above. > mate-panel/panel.c:893:34: warning: Either the condition 'info!=((void*)0)' is redundant or there is possible null pointer dereference: info. [nullPointerRedundantCheck] > parent = gtk_widget_get_parent (info->widget); > ^ > mate-panel/panel.c:895:11: note: Assuming that condition 'info!=((void*)0)' is not redundant > if (info != NULL && > ^ > mate-panel/panel.c:893:34: note: Null pointer dereference > parent = gtk_widget_get_parent (info->widget); > ^ --- mate-panel/panel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mate-panel/panel.c b/mate-panel/panel.c index 49e10b23..89544246 100644 --- a/mate-panel/panel.c +++ b/mate-panel/panel.c @@ -892,8 +892,7 @@ move_applet (PanelWidget *panel, int pos, int applet_index) parent = gtk_widget_get_parent (info->widget); - if (info != NULL && - info->widget != NULL && + if (info->widget != NULL && parent != NULL && PANEL_IS_WIDGET (parent)) { GSList *forb; -- cgit v1.2.1