aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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..4118dcc 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) /* a is charging */
{
ret = -1;
}