aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-13 09:15:27 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-03-13 09:15:27 -0500
commit3c4a789e9607a312d7230b797d875f9dab02d2d1 (patch)
tree00c751ade234545ea618e1662c57990e1cd95eb2 /src
parent9936e22d5e70cd10988f328e8d86b1e5bc93ede9 (diff)
downloadayatana-indicator-power-3c4a789e9607a312d7230b797d875f9dab02d2d1.tar.gz
ayatana-indicator-power-3c4a789e9607a312d7230b797d875f9dab02d2d1.tar.bz2
ayatana-indicator-power-3c4a789e9607a312d7230b797d875f9dab02d2d1.zip
remove INDICATOR_IS_POWER_DEVICE(device) tests from private functions
Diffstat (limited to 'src')
-rw-r--r--src/device.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/device.c b/src/device.c
index 37b1d8b..d07f6c5 100644
--- a/src/device.c
+++ b/src/device.c
@@ -585,11 +585,7 @@ static char*
get_expanded_time_remaining (const IndicatorPowerDevice * device)
{
char * str = NULL;
- const IndicatorPowerDevicePrivate * p;
-
- g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device));
-
- p = device->priv;
+ const IndicatorPowerDevicePrivate * p = device->priv;
if (p->time && ((p->state == UP_DEVICE_STATE_CHARGING) || (p->state == UP_DEVICE_STATE_DISCHARGING)))
{
@@ -624,11 +620,7 @@ static char *
get_accessible_time_remaining (const IndicatorPowerDevice * device)
{
char * str = NULL;
- const IndicatorPowerDevicePrivate * p;
-
- g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device));
-
- p = device->priv;
+ const IndicatorPowerDevicePrivate * p = device->priv;
if (p->time && ((p->state == UP_DEVICE_STATE_CHARGING) || (p->state == UP_DEVICE_STATE_DISCHARGING)))
{