summaryrefslogtreecommitdiff
path: root/libnm/nm-device-wimax.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-08-25 10:33:53 -0400
committerDan Winship <danw@gnome.org>2014-09-04 09:21:05 -0400
commit3e5b3833aa4964f6d2224560f3ad8c7ffa1e8027 (patch)
tree411d50040fa8997bcd912e1f4eebd83c364a0e4a /libnm/nm-device-wimax.c
parent074c2093b6a733c3d5712a7c58386e1e652a8903 (diff)
downloadNetworkManager-3e5b3833aa4964f6d2224560f3ad8c7ffa1e8027.tar.gz
libnm: change empty-GPtrArray-return semantics
libnm functions that return GPtrArrays of objects had a rule that if the array was empty, they would return NULL rather than a 0-length array. As it turns out, this is just a nuisance to clients, since in most places the code for the non-empty case would end up doing the right thing for the empty case as well (and where it doesn't, we can check "array->len == 0" just as easily as "array == NULL"). So just return the 0-length array instead.
Diffstat (limited to 'libnm/nm-device-wimax.c')
-rw-r--r--libnm/nm-device-wimax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm/nm-device-wimax.c b/libnm/nm-device-wimax.c
index 5f190ea3f0..fc5793acb2 100644
--- a/libnm/nm-device-wimax.c
+++ b/libnm/nm-device-wimax.c
@@ -161,7 +161,7 @@ nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
{
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), NULL);
- return handle_ptr_array_return (NM_DEVICE_WIMAX_GET_PRIVATE (wimax)->nsps);
+ return NM_DEVICE_WIMAX_GET_PRIVATE (wimax)->nsps;
}
/**