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 734267 - power: Remove unnecessary min variables.
power: Remove unnecessary min variables.
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-05 09:51 UTC by Shih-Yuan Lee (FourDollars)
Modified: 2014-08-06 07:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace 0 by min. (1.56 KB, patch)
2014-08-05 09:51 UTC, Shih-Yuan Lee (FourDollars)
needs-work Details | Review
There is no need to use min variable anymore. (6.19 KB, patch)
2014-08-06 02:46 UTC, Shih-Yuan Lee (FourDollars)
committed Details | Review

Description Shih-Yuan Lee (FourDollars) 2014-08-05 09:51:35 UTC
Created attachment 282535 [details] [review]
Replace 0 by min.

We should not assume the minimum brightness level is 0.
Comment 1 Bastien Nocera 2014-08-05 10:04:03 UTC
Review of attachment 282535 [details] [review]:

Given that min is never actually set to anything but 0 in this code, I'd rather remove the min variable altogether.
Comment 2 Shih-Yuan Lee (FourDollars) 2014-08-06 02:46:01 UTC
Created attachment 282620 [details] [review]
There is no need to use min variable anymore.
Comment 3 Bastien Nocera 2014-08-06 07:50:12 UTC
commit 3e6effd7dff2c1a0c2c1214e41f28737205eec72
Author: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
Date:   Wed Aug 6 10:41:19 2014 +0800

    power: Remove unnecessary min variables
    
    There is no need to use min variable anymore, as it's always set to 0.
    If we were to revert this because we need a different minimum, note that
    the related bug contains bug fixes for cases where min should have been
    used but was not.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734267