diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-13 10:31:33 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-03-13 10:31:33 -0500 |
commit | bee479452605a446567e4e4d0c0ae6d008ae8015 (patch) | |
tree | e2443a7bb92ff564f84abf8c6d3559c8c0789f33 | |
parent | a49c013fd0340bc4e6f8bb9dd6f4b7efdb20994a (diff) | |
download | ayatana-indicator-power-bee479452605a446567e4e4d0c0ae6d008ae8015.tar.gz ayatana-indicator-power-bee479452605a446567e4e4d0c0ae6d008ae8015.tar.bz2 ayatana-indicator-power-bee479452605a446567e4e4d0c0ae6d008ae8015.zip |
in the new indicator_power_device_get_*() functions, use g_return_val_if_fail(foo, NULL) rather than g_return_if_fail(foo)
-rw-r--r-- | src/device.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c index 854dbfb..ed3c399 100644 --- a/src/device.c +++ b/src/device.c @@ -728,7 +728,7 @@ get_menuitem_text (const IndicatorPowerDevice * device, char * indicator_power_device_get_readable_text (const IndicatorPowerDevice * device) { - g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device)); + g_return_val_if_fail (INDICATOR_IS_POWER_DEVICE(device), NULL); return get_menuitem_text (device, FALSE); } @@ -736,7 +736,7 @@ indicator_power_device_get_readable_text (const IndicatorPowerDevice * device) char * indicator_power_device_get_accessible_text (const IndicatorPowerDevice * device) { - g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device)); + g_return_val_if_fail (INDICATOR_IS_POWER_DEVICE(device), NULL); return get_menuitem_text (device, TRUE); } @@ -762,7 +762,7 @@ indicator_power_device_get_readable_title (const IndicatorPowerDevice * device, char * time_str = NULL; const IndicatorPowerDevicePrivate * p; - g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device)); + g_return_val_if_fail (INDICATOR_IS_POWER_DEVICE(device), NULL); p = device->priv; @@ -811,6 +811,8 @@ indicator_power_device_get_accessible_title (const IndicatorPowerDevice * device gboolean want_time G_GNUC_UNUSED, gboolean want_percent G_GNUC_UNUSED) { + g_return_val_if_fail (INDICATOR_IS_POWER_DEVICE(device), NULL); + return indicator_power_device_get_accessible_text (device); } |