summaryrefslogtreecommitdiff
path: root/bus/config-parser-trivial.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-07-23 17:33:24 +0100
committerSimon McVittie <smcv@collabora.com>2018-08-02 15:26:27 +0100
commit46cdc12830c413a80ca13b1fae0a7dc1f8ced263 (patch)
tree8afa4c3641894b9c6aeaaf49ed60684b0c4f2fc2 /bus/config-parser-trivial.c
parent7efc06293ab8a6bf4aba50dac0da55e4a583360a (diff)
downloaddbus-46cdc12830c413a80ca13b1fae0a7dc1f8ced263.tar.gz
Add and use _dbus_list_clear_full
In gcc 8, -Wall -Wextra includes -Wcast-function-type, which warns about passing an extra (unwanted) parameter to callbacks. Instead of using _dbus_list_foreach(), add a function to do what we actually wanted here. Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107349 Reviewed-by: Thiago Macieira <thiago@kde.org>
Diffstat (limited to 'bus/config-parser-trivial.c')
-rw-r--r--bus/config-parser-trivial.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c
index 0351d20a..796c25e5 100644
--- a/bus/config-parser-trivial.c
+++ b/bus/config-parser-trivial.c
@@ -122,13 +122,7 @@ bus_config_parser_unref (BusConfigParser *parser)
_dbus_string_free (&parser->user);
_dbus_string_free (&parser->service_helper);
_dbus_string_free (&parser->bus_type);
-
- _dbus_list_foreach (&parser->service_dirs,
- (DBusForeachFunction) dbus_free,
- NULL);
-
- _dbus_list_clear (&parser->service_dirs);
-
+ _dbus_list_clear_full (&parser->service_dirs, dbus_free);
dbus_free (parser);
}