From 3c4a789e9607a312d7230b797d875f9dab02d2d1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 13 Mar 2014 09:15:27 -0500 Subject: remove INDICATOR_IS_POWER_DEVICE(device) tests from private functions --- src/device.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/device.c') 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))) { -- cgit v1.2.3