From 544827a8d15d820b16b1516606979da001f2e49f Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 28 Apr 2016 17:39:05 +0200 Subject: [PATCH] ifnet: fix error handling CID 76722 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: g_set_error(error, nm_setti.... (cherry picked from commit 2e563d9c842cda076413c62fe9cd96c58705ea47) --- src/settings/plugins/ifnet/connection_parser.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/settings/plugins/ifnet/connection_parser.c b/src/settings/plugins/ifnet/connection_parser.c index d9ff97dc4d..80b8253561 100644 --- a/src/settings/plugins/ifnet/connection_parser.c +++ b/src/settings/plugins/ifnet/connection_parser.c @@ -1541,15 +1541,12 @@ make_wireless_security_setting (const char *conn_name, if (wsec == NULL) goto error; } - - if (!wsec) { - g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION, - "Can't handle security information for ssid: %s", - conn_name); - } - return wsec; + error: + g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION, + "Can't handle security information for ssid: %s", + conn_name); return NULL; }