diff options
author | Thomas Haller <thaller@redhat.com> | 2013-10-31 14:13:33 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2013-11-13 15:29:24 +0100 |
commit | 97935382f4aca80b8f952ea9fe3ce205253758b7 (patch) | |
tree | d1dbfe40b5e93ef2c60649956519fe763004c530 /src/nm-dispatcher.c | |
parent | ab92a0d69c6f75eb8137674a00cd9735556b06ad (diff) | |
download | NetworkManager-97935382f4aca80b8f952ea9fe3ce205253758b7.tar.gz |
coverity: fix various warnings detected with Coverity
These are (most likely) only warnings and not severe bugs.
Some of these changes are mostly made to get a clean run of
Coverity without any warnings.
Error found by running Coverity scan
https://bugzilla.redhat.com/show_bug.cgi?id=1025894
Co-Authored-By: Jiří Klimeš <jklimes@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/nm-dispatcher.c')
-rw-r--r-- | src/nm-dispatcher.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/nm-dispatcher.c b/src/nm-dispatcher.c index 45715a9911..fafc9041a5 100644 --- a/src/nm-dispatcher.c +++ b/src/nm-dispatcher.c @@ -213,8 +213,8 @@ dispatcher_done_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) err = g_value_get_string (tmp); if (result != DISPATCH_RESULT_SUCCESS) { - nm_log_warn (LOGD_CORE, "Dispatcher script %s: %s", - dispatch_result_to_string (result), err); + nm_log_warn (LOGD_CORE, "Dispatcher script \"%s\" failed with %s: %s", + script, dispatch_result_to_string (result), err); } next: @@ -282,7 +282,6 @@ _dispatcher_call (DispatcherAction action, GHashTable *device_dhcp6_props; GHashTable *vpn_ip4_props; GHashTable *vpn_ip6_props; - DBusGProxyCall *call; DispatchInfo *info; /* All actions except 'hostname' require a device */ @@ -339,23 +338,23 @@ _dispatcher_call (DispatcherAction action, info->user_data = user_data; /* Send the action to the dispatcher */ - call = dbus_g_proxy_begin_call_with_timeout (proxy, "Action", - dispatcher_done_cb, - info, - (GDestroyNotify) dispatcher_info_free, - 15000, - G_TYPE_STRING, action_to_string (action), - DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, connection_hash, - DBUS_TYPE_G_MAP_OF_VARIANT, connection_props, - DBUS_TYPE_G_MAP_OF_VARIANT, device_props, - DBUS_TYPE_G_MAP_OF_VARIANT, device_ip4_props, - DBUS_TYPE_G_MAP_OF_VARIANT, device_ip6_props, - DBUS_TYPE_G_MAP_OF_VARIANT, device_dhcp4_props, - DBUS_TYPE_G_MAP_OF_VARIANT, device_dhcp6_props, - G_TYPE_STRING, vpn_iface ? vpn_iface : "", - DBUS_TYPE_G_MAP_OF_VARIANT, vpn_ip4_props, - DBUS_TYPE_G_MAP_OF_VARIANT, vpn_ip6_props, - G_TYPE_INVALID); + dbus_g_proxy_begin_call_with_timeout (proxy, "Action", + dispatcher_done_cb, + info, + (GDestroyNotify) dispatcher_info_free, + 15000, + G_TYPE_STRING, action_to_string (action), + DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, connection_hash, + DBUS_TYPE_G_MAP_OF_VARIANT, connection_props, + DBUS_TYPE_G_MAP_OF_VARIANT, device_props, + DBUS_TYPE_G_MAP_OF_VARIANT, device_ip4_props, + DBUS_TYPE_G_MAP_OF_VARIANT, device_ip6_props, + DBUS_TYPE_G_MAP_OF_VARIANT, device_dhcp4_props, + DBUS_TYPE_G_MAP_OF_VARIANT, device_dhcp6_props, + G_TYPE_STRING, vpn_iface ? vpn_iface : "", + DBUS_TYPE_G_MAP_OF_VARIANT, vpn_ip4_props, + DBUS_TYPE_G_MAP_OF_VARIANT, vpn_ip6_props, + G_TYPE_INVALID); g_hash_table_destroy (connection_hash); g_hash_table_destroy (connection_props); g_hash_table_destroy (device_props); |