From 73da0d4d65ef0925772b7b7f82a5fbb3ff2c5e4f Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Tue, 16 May 2023 12:37:11 -0400 Subject: [PATCH] Remove unused variable retval in sock_present2network This quiets the compiler since it is not even returned anyway, and is a misleading variable name. (cherry picked from commit c7b90298984c46d820d3cee79a96d24870b5f200) Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/73da0d4d65ef0925772b7b7f82a5fbb3ff2c5e4f] CVE: CVE-2023-7256 #Dependency Patch Signed-off-by: Vijay Anusuri --- sockutils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sockutils.c b/sockutils.c index 1c07f76fd1..6752f296af 100644 --- a/sockutils.c +++ b/sockutils.c @@ -2082,7 +2082,6 @@ int sock_getascii_addrport(const struct sockaddr_storage *sockaddr, char *addres */ int sock_present2network(const char *address, struct sockaddr_storage *sockaddr, int addr_family, char *errbuf, int errbuflen) { - int retval; struct addrinfo *addrinfo; struct addrinfo hints; @@ -2090,7 +2089,7 @@ int sock_present2network(const char *address, struct sockaddr_storage *sockaddr, hints.ai_family = addr_family; - if ((retval = sock_initaddress(address, "22222" /* fake port */, &hints, &addrinfo, errbuf, errbuflen)) == -1) + if (sock_initaddress(address, "22222" /* fake port */, &hints, &addrinfo, errbuf, errbuflen) == -1) return 0; if (addrinfo->ai_family == PF_INET)