From 4da19b89815cbf6e063e39bc33c04fe4b3f789df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 12 Dec 2014 21:52:31 +0100 Subject: [PATCH] device: mute coverity CHECKED_RETURN (CWE-252) Error: CHECKED_RETURN (CWE-252): [#def20] NetworkManager-0.9.11.0/src/devices/nm-device.c:5037: check_return: Calling "g_spawn_async" without checking return value (as is done elsewhere 12 out of 13 times). --- src/devices/nm-device.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index cd548d260e..c04a973877 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5037,16 +5037,18 @@ send_arps (NMDevice *self, const char *mode_arg) for (i = 0; i < num; i++) { gs_free char *tmp_str = NULL; + gboolean success; + addr = nm_setting_ip_config_get_address (s_ip4, i); argv[ip_arg] = nm_ip_address_get_address (addr); _LOGD (LOGD_DEVICE | LOGD_IP4, "arping: run %s", (tmp_str = g_strjoinv (" ", (char **) argv))); - g_spawn_async (NULL, (char **) argv, NULL, - G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, - nm_unblock_posix_signals, - NULL, NULL, &error); - if (error) { + success = g_spawn_async (NULL, (char **) argv, NULL, + G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, + nm_unblock_posix_signals, + NULL, NULL, &error); + if (!success) { _LOGW (LOGD_DEVICE | LOGD_IP4, "arping: could not send ARP for local address %s: %s", argv[ip_arg], error->message);