[gtk+/gtk-3-22] Notebook: Remove null check after dereference
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] Notebook: Remove null check after dereference
- Date: Tue, 1 Aug 2017 19:19:59 +0000 (UTC)
commit a381a06b1280acb80c83a3eeea827ef163e4928d
Author: Daniel Boles <dboles src gnome org>
Date: Tue Aug 1 19:45:57 2017 +0100
Notebook: Remove null check after dereference
This function clearly assumes the parameter children cannot be NULL, and
the call sites seem to perform enough checks to confirm this.
CID 1388869 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking children suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
gtk/gtknotebook.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index e75ac50..56b601d 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -6002,8 +6002,7 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
}
/* Don't move the current tab past the last position during tabs reordering */
- if (children &&
- priv->operation == DRAG_OPERATION_REORDER &&
+ if (priv->operation == DRAG_OPERATION_REORDER &&
direction == STEP_NEXT)
{
switch (tab_pos)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]