From 668af232e08755da592f0c93edadd785a44354a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Sun, 27 Aug 2023 12:06:35 -0400 Subject: [PATCH] ip_utils: cleanup Change-Id: I995159823f1fab0fc5c1041e30cd764472a65754 --- src/ip_utils.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/ip_utils.cpp b/src/ip_utils.cpp index 9cd5c0f..25e1f40 100644 --- a/src/ip_utils.cpp +++ b/src/ip_utils.cpp @@ -89,11 +89,7 @@ ip_utils::getHostName() p = inet_ntop(AF_INET, &localAddr.sin_addr, tempstr, sizeof(tempstr)); if (p) { ret.address = p; - } else { - return {}; } - } else { - return {}; } #elif (defined(BSD) && BSD >= 199306) || defined(__FreeBSD_kernel__) struct ifaddrs* ifap; @@ -180,9 +176,6 @@ ip_utils::getHostName() j++; // Increment j if we found an address which is not loopback and is up. } close(localSock); - if (p == NULL) { - return {}; - } #endif return ret; } -- GitLab