diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-08 16:30:52 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-08 16:30:52 +0200 |
commit | 373b3d7728ec69d3e1371bfd59298ab752ae4fe5 (patch) | |
tree | 77fbdf7f4f898a1047290cc645653873424a8b71 | |
parent | ab0901088ee93e61219910ecd508295184767f28 (diff) |
Make sure max is initialized properly in all cases
-rw-r--r-- | audio/telephony-maemo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c index b5f69b13..e22d0051 100644 --- a/audio/telephony-maemo.c +++ b/audio/telephony-maemo.c @@ -1204,7 +1204,9 @@ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data) if ((battchg_design > 0 || battchg_last > 0) && battchg_cur >= 0) { int new, cur, max; - if (battchg_last <= 0) + if (battchg_last > 0) + max = battchg_last; + else max = battchg_design; cur = telephony_get_indicator(maemo_indicators, "battchg"); |