aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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)))
{