After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787303 - gtk+-3.22.20/gtk/gtknotebook.c: 2 * redundant conditions ?
gtk+-3.22.20/gtk/gtknotebook.c: 2 * redundant conditions ?
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.91.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-09-05 10:35 UTC by dcb
Modified: 2017-09-12 14:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtknotebook: Simplify some if-conditions (1.50 KB, patch)
2017-09-11 08:27 UTC, Philip Withnall
committed Details | Review

Description dcb 2017-09-05 10:35:16 UTC
1.

[gtk+-3.22.20/gtk/gtknotebook.c:5955]: (style) Redundant condition: priv->operation==DRAG_OPERATION_REORDER. 'A || (!A && B)' is equivalent to 'A || B'

Source code is

          if (priv->operation != DRAG_OPERATION_REORDER ||
              (priv->operation == DRAG_OPERATION_REORDER && page != priv->cur_page))

2.

[gtk+-3.22.20/gtk/gtknotebook.c:5977]: (style) Redundant condition: priv->operation==DRAG_OPERATION_REORDER. 'A || (!A && B)' is equivalent to 'A || B'

Duplicate.
Comment 1 Philip Withnall 2017-09-11 08:27:31 UTC
Created attachment 359505 [details] [review]
gtknotebook: Simplify some if-conditions

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 Daniel Boles 2017-09-12 13:53:49 UTC
Review of attachment 359505 [details] [review]:

eh, why not
Comment 3 Philip Withnall 2017-09-12 14:23:00 UTC
Attachment 359505 [details] pushed as 69102ac - gtknotebook: Simplify some if-conditions