diff options
author | Colomban Wendling <[email protected]> | 2023-11-15 15:32:56 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2023-11-21 20:19:58 +0000 |
commit | 6a3df1342b957f0293c7a9f05b3037dff3156487 (patch) | |
tree | b27ee0cef0b942e7360f7d677453c94c13063048 | |
parent | 17b87e321bfca409c31ce4b4e0e3326eeef92b88 (diff) | |
download | mate-panel-6a3df1342b957f0293c7a9f05b3037dff3156487.tar.bz2 mate-panel-6a3df1342b957f0293c7a9f05b3037dff3156487.tar.xz |
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);
> ^
-rw-r--r-- | mate-panel/panel.c | 3 |
1 files changed, 1 insertions, 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; |