summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2014-12-12 21:52:31 +0100
committerThomas Haller <thaller@redhat.com>2014-12-16 21:47:01 +0100
commit34c6e5cdbec3b3285a67598bac2e39c0cc3f518d (patch)
tree17d7af21a1703cf2d5cb481f25feeea15b5a5ab8
parent7ee93a00290f38a826fb9ebdbeff5a8b3c5aae44 (diff)
downloadNetworkManager-34c6e5cdbec3b3285a67598bac2e39c0cc3f518d.tar.gz
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). (cherry picked from commit 4da19b89815cbf6e063e39bc33c04fe4b3f789df)
-rw-r--r--src/devices/nm-device.c12
1 files 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);