From 373b3d7728ec69d3e1371bfd59298ab752ae4fe5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 8 Dec 2008 16:30:52 +0200 Subject: Make sure max is initialized properly in all cases --- audio/telephony-maemo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'audio') 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"); -- cgit