diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-05-31 14:07:14 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-05-31 14:07:14 -0500 |
commit | 9a753ec3cfbf64ec11ea2bccbaa5c511177a69b3 (patch) | |
tree | 70ed158d47e3fbb7372291f9cbee2e4a42d47d1b /src/device.c | |
parent | 8476e802d84ee91e50dd6556d8293ece77033201 (diff) | |
download | ayatana-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
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 6 |
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); |