Fix usage of g_return_val_if_fail
This commit is contained in:
parent
328d731512
commit
6e9720ea8d
@ -16,7 +16,7 @@
|
|||||||
nm_network_menu_item_get_strength (NMNetworkMenuItem * item)
|
nm_network_menu_item_get_strength (NMNetworkMenuItem * item)
|
||||||
{
|
{
|
||||||
- g_return_if_fail (item != NULL);
|
- g_return_if_fail (item != NULL);
|
||||||
+ g_return_if_fail (item != NULL, 0);
|
+ g_return_val_if_fail (item != NULL, 0);
|
||||||
|
|
||||||
return item->int_strength;
|
return item->int_strength;
|
||||||
}
|
}
|
||||||
@ -26,8 +26,8 @@
|
|||||||
{
|
{
|
||||||
- g_return_if_fail (item != NULL);
|
- g_return_if_fail (item != NULL);
|
||||||
- g_return_if_fail (length != NULL);
|
- g_return_if_fail (length != NULL);
|
||||||
+ g_return_if_fail (item != NULL, NULL);
|
+ g_return_val_if_fail (item != NULL, NULL);
|
||||||
+ g_return_if_fail (length != NULL, NULL);
|
+ g_return_val_if_fail (length != NULL, NULL);
|
||||||
|
|
||||||
*length = item->hash_len;
|
*length = item->hash_len;
|
||||||
return item->hash;
|
return item->hash;
|
||||||
|
Loading…
Reference in New Issue
Block a user