summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-04-23 09:34:55 +0200
committerLubomir Rintel <lkundrak@v3.sk>2018-04-23 09:50:12 +0200
commitde8bf7421d5fc4612d351fa9543c730c3d04e9a9 (patch)
treeba9e9d567f36809f9eb293d38119e410523b9065 /shared
parentc898969110d2fe7ca80e826b0638187da40d8125 (diff)
downloadNetworkManager-de8bf7421d5fc4612d351fa9543c730c3d04e9a9.tar.gz
n-acd: don't use a return value in deallocator
...so that its prototype is compatible with GDestroyNotify: src/devices/nm-acd-manager.c: In function ‘destroy_address_info’: /usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘NAcd * (*)(NAcd *)’ {aka ‘struct NAcd * (*)(struct NAcd *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type] GDestroyNotify _destroy = (GDestroyNotify) (destroy); \ ^ src/devices/nm-acd-manager.c:430:2: note: in expansion of macro ‘g_clear_pointer’ g_clear_pointer (&info->acd, n_acd_free); ^~~~~~~~~~~~~~~ The same change was done upstream, so the subsequent subtree pull of n-acd won't mess this up.
Diffstat (limited to 'shared')
-rw-r--r--shared/n-acd/src/n-acd.c6
-rw-r--r--shared/n-acd/src/n-acd.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c
index 492bfde4ff..ae149abbf0 100644
--- a/shared/n-acd/src/n-acd.c
+++ b/shared/n-acd/src/n-acd.c
@@ -302,11 +302,11 @@ error:
*
* Return: NULL.
*/
-_public_ NAcd *n_acd_free(NAcd *acd) {
+_public_ void n_acd_free(NAcd *acd) {
NAcdEventNode *node;
if (!acd)
- return NULL;
+ return;
n_acd_reset(acd);
@@ -330,8 +330,6 @@ _public_ NAcd *n_acd_free(NAcd *acd) {
}
free(acd);
-
- return NULL;
}
/**
diff --git a/shared/n-acd/src/n-acd.h b/shared/n-acd/src/n-acd.h
index eb12a53eec..46394dcaa3 100644
--- a/shared/n-acd/src/n-acd.h
+++ b/shared/n-acd/src/n-acd.h
@@ -73,7 +73,7 @@ enum {
};
int n_acd_new(NAcd **acdp);
-NAcd *n_acd_free(NAcd *acd);
+void n_acd_free(NAcd *acd);
void n_acd_get_fd(NAcd *acd, int *fdp);