aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-05-31 14:07:14 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-05-31 14:07:14 -0500
commit9a753ec3cfbf64ec11ea2bccbaa5c511177a69b3 (patch)
tree70ed158d47e3fbb7372291f9cbee2e4a42d47d1b
parent8476e802d84ee91e50dd6556d8293ece77033201 (diff)
downloadayatana-indicator-power-9a753ec3cfbf64ec11ea2bccbaa5c511177a69b3.tar.gz
ayatana-indicator-power-9a753ec3cfbf64ec11ea2bccbaa5c511177a69b3.tar.bz2
ayatana-indicator-power-9a753ec3cfbf64ec11ea2bccbaa5c511177a69b3.zip
in indicator_power_device_get_time_details(), limit the scope of variables short_timestring and detailed_timestring
-rw-r--r--src/device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c
index dc8db3a..8f040b2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -520,11 +520,11 @@ indicator_power_device_get_time_details (const IndicatorPowerDevice * device,
const gdouble percentage = indicator_power_device_get_percentage (device);
const gchar * device_name = device_kind_to_localised_string (indicator_power_device_get_kind(device));
- gchar *short_timestring = NULL;
- gchar *detailed_timestring = NULL;
-
if (time > 0)
{
+ gchar *short_timestring = NULL;
+ gchar *detailed_timestring = NULL;
+
get_timestring (time,
&short_timestring,
&detailed_timestring);