From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0BDBA21C913D4 for ; Mon, 13 Nov 2017 08:26:42 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA48C552D1; Mon, 13 Nov 2017 16:30:48 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-226.rdu2.redhat.com [10.10.120.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 358BA7D515; Mon, 13 Nov 2017 16:30:47 +0000 (UTC) To: "Carsey, Jaben" , Thiebaud Weksteen , "edk2-devel@lists.01.org" , Daryl McDaniel Cc: "Bjorge, Erik C" References: <2c8db66b18b93d008b1bb8028c23f51ce2b76b29.1509011535.git.tweek@google.com> From: Laszlo Ersek Message-ID: <10370415-4e4c-5008-1caf-bbd2455e2db9@redhat.com> Date: Mon, 13 Nov 2017 17:30:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 13 Nov 2017 16:30:48 +0000 (UTC) Subject: Re: [PATCH] StdLib/BsdSocketLib: Remove unused variables X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 16:26:44 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/13/17 16:40, Carsey, Jaben wrote: > Reviewed-by: Jaben Carsey > > And pushed. Thank you both! I closed as RESOLVED/FIXED. Cheers Laszlo >> -----Original Message----- >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >> Laszlo Ersek >> Sent: Monday, November 13, 2017 5:27 AM >> To: Thiebaud Weksteen ; edk2-devel@lists.01.org; >> Daryl McDaniel ; Carsey, Jaben >> >> Cc: Bjorge, Erik C >> Subject: Re: [edk2] [PATCH] StdLib/BsdSocketLib: Remove unused variables >> Importance: High >> >> Jaben, Daryl, >> >> can you please review this patch? >> >> Thiebaud: best CC the package maintainers from Maintainers.txt on patches. >> >> Thanks! >> Laszlo >> >> On 10/26/17 11:58, Thiebaud Weksteen wrote: >>> TianoCore BZ#677 >>> >>> Remove unused variables and turn nsdispatch macro into a function. This >>> is not what is recommended in the bug ticket but avoid heavier >>> modification of the code (and deviation from upsteam). >>> >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> Signed-off-by: Thiebaud Weksteen >>> --- >>> StdLib/BsdSocketLib/getaddrinfo.c | 10 ++++++---- >>> StdLib/BsdSocketLib/gethostbydns.c | 2 ++ >>> 2 files changed, 8 insertions(+), 4 deletions(-) >>> >>> diff --git a/StdLib/BsdSocketLib/getaddrinfo.c >> b/StdLib/BsdSocketLib/getaddrinfo.c >>> index 5a0baf6d45..9d1acdb3fb 100644 >>> --- a/StdLib/BsdSocketLib/getaddrinfo.c >>> +++ b/StdLib/BsdSocketLib/getaddrinfo.c >>> @@ -92,7 +92,6 @@ __RCSID("$NetBSD: getaddrinfo.c,v 1.91.6.1 >> 2009/01/26 00:27:34 snj Exp $"); >>> #include >>> >>> #define endservent_r(svd) endservent() >>> -#define nsdispatch(pResult,dtab,database,routine,files,hostname,pai) >> NS_NOTFOUND >>> #define >> res_nmkquery(state,op,dname,class,type,data,datalen,newrr_in,buf,buflen >> ) res_mkquery( op, dname, class, type, data, datalen, newrr_in, buf, buflen ) >>> #define res_nsend(state,buf,buflen,ans,anssiz) res_send ( buf, buflen, >> ans, anssiz ) >>> >>> @@ -306,6 +305,12 @@ do { >> \ >>> #define MATCH(x, y, w) >> \ >>> ((x) == (y) || (/*CONSTCOND*/(w) && ((x) == ANY || (y) == ANY))) >>> >>> +int nsdispatch(void *result, const ns_dtab dist_tab[], const char* >> database, >>> + const char *method, const ns_src defaults[], ...) >>> +{ >>> + return NS_NOTFOUND; >>> +} >>> + >>> const char * >>> gai_strerror(int ecode) >>> { >>> @@ -1062,9 +1067,6 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 >> *sin6, u_int32_t *scopeid) >>> >>> /* code duplicate with gethnamaddr.c */ >>> >>> -static const char AskedForGot[] = >>> - "gethostby*.getanswer: asked for \"%s\", got \"%s\""; >>> - >>> static struct addrinfo * >>> getanswer(const querybuf *answer, int anslen, const char *qname, int >> qtype, >>> const struct addrinfo *pai) >>> diff --git a/StdLib/BsdSocketLib/gethostbydns.c >> b/StdLib/BsdSocketLib/gethostbydns.c >>> index 25e7c3b142..17c43ba59c 100644 >>> --- a/StdLib/BsdSocketLib/gethostbydns.c >>> +++ b/StdLib/BsdSocketLib/gethostbydns.c >>> @@ -129,8 +129,10 @@ u_int16_t _getshort(const u_char *src); >>> #define MAXALIASES 35 >>> #define MAXADDRS 35 >>> >>> +#ifdef _ORG_FREEBSD_ >>> static const char AskedForGot[] = >>> "gethostby*.gethostanswer: asked for \"%s\", got \"%s\""; >>> +#endif >>> >>> static char *h_addr_ptrs[MAXADDRS + 1]; >>> >>> >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel