[gnome-settings-daemon/gnome-3-2] power: Use parenthesis to make condition possible



commit efd5c7096bb8a87709949fc563284d0079698359
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Oct 20 16:56:29 2011 +0100

    power: Use parenthesis to make condition possible

 plugins/power/gpm-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c
index 408259b..c0f42ff 100644
--- a/plugins/power/gpm-common.c
+++ b/plugins/power/gpm-common.c
@@ -290,7 +290,7 @@ gpm_upower_get_device_summary (UpDevice *device)
 
         /* we care if we are on AC */
         if (kind == UP_DEVICE_KIND_PHONE) {
-                if (state == UP_DEVICE_STATE_CHARGING || !state == UP_DEVICE_STATE_DISCHARGING) {
+                if (state == UP_DEVICE_STATE_CHARGING || !(state == UP_DEVICE_STATE_DISCHARGING)) {
                         g_string_append (description, device_desc);
                         g_string_append_printf (description, " (%.0f%%)", percentage);
                         goto out;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]