aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-power.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/indicator-power.c')
-rw-r--r--src/indicator-power.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index 852ccd5..8da9734 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -399,11 +399,11 @@ device_compare_func (gconstpointer ga, gconstpointer gb)
state = UP_DEVICE_STATE_CHARGING;
if (!ret && (((a_state == state) && a_time) || ((b_state == state) && b_time)))
{
- if (b_state != state) /* a is charging */
+ if (a_state != state) /* b is charging */
{
ret = 1;
}
- if (a_state != state) /* b is charging */
+ else if (b_state != state) /* b is charging */
{
ret = -1;
}