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 752551 - questionable code in meta-monitor-config.c
questionable code in meta-monitor-config.c
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-07-18 04:27 UTC by Matthias Clasen
Modified: 2015-07-20 21:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2015-07-18 04:27:57 UTC
coverity pointed me at the following snipplet around line 460 in meta-monitor-cnfig.c:

               if (parser->output.rect.width == 0 &&
                    parser->output.rect.width == 0)
                  parser->output.enabled = FALSE;
                else
                  parser->output.enabled = TRUE;

Thats surely not what was intended here. Maybe this was supposed to be

  width == 0 && height == 0

or 

  width == 0 || height == 0 

?
Comment 1 drago01 2015-07-18 06:48:01 UTC
Looking at the code seems to be like the latter while in practice either should work (i.e can't see how we can get width == 0 && height != width).