From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13472 Path: news.gmane.org!.POSTED!not-for-mail From: megous@megous.com Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] Fix incorrect parameter name in RTA_OK macro Date: Wed, 21 Nov 2018 17:29:21 +0100 Message-ID: <20181121162921.28379-1-megous@megous.com> References: <20181120232950.belzgih65diux3qt@core.my.home> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1542817663 31541 195.159.176.226 (21 Nov 2018 16:27:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2018 16:27:43 +0000 (UTC) Cc: Ondrej Jirman To: musl@lists.openwall.com Original-X-From: musl-return-13488-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 21 17:27:39 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gPVLm-00088C-Pa for gllmg-musl@m.gmane.org; Wed, 21 Nov 2018 17:27:38 +0100 Original-Received: (qmail 15529 invoked by uid 550); 21 Nov 2018 16:29:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15496 invoked from network); 21 Nov 2018 16:29:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1542817775; bh=nhb2NeK4rubBxmWgPOWx0vVbANbDdRED7fi5ucEI7MI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sHlmMFu51DMrrfU4xIdJLAWJ2pFl/D14Ph5vqogTGnivcAo3CDruYFTgEOy7ORuRS uZrXDz1Skkfn3lUjzjLaVTuojU53E3PJOX1wteyTla7JSkBt3kT63BqZiHZuZsHJvP EjVXid3J+z2pu41tnrNUd0hFXmHQZIP8l5v4MW9Q= In-Reply-To: <20181120232950.belzgih65diux3qt@core.my.home> Xref: news.gmane.org gmane.linux.lib.musl.general:13472 Archived-At: From: Ondrej Jirman The wrong name works only by accident. --- src/network/netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) This is a proper patch for the issue I've described in a recent e-mail to the mailing list. diff --git a/src/network/netlink.h b/src/network/netlink.h index 38acb178..873fabe2 100644 --- a/src/network/netlink.h +++ b/src/network/netlink.h @@ -86,7 +86,7 @@ struct ifaddrmsg { #define RTA_DATALEN(rta) ((rta)->rta_len-sizeof(struct rtattr)) #define RTA_DATAEND(rta) ((char*)(rta)+(rta)->rta_len) #define RTA_NEXT(rta) (struct rtattr*)((char*)(rta)+NETLINK_ALIGN((rta)->rta_len)) -#define RTA_OK(nlh,end) ((char*)(end)-(char*)(rta) >= sizeof(struct rtattr)) +#define RTA_OK(rta,end) ((char*)(end)-(char*)(rta) >= sizeof(struct rtattr)) #define NLMSG_RTA(nlh,len) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr)+NETLINK_ALIGN(len))) #define NLMSG_RTAOK(rta,nlh) RTA_OK(rta,NLMSG_DATAEND(nlh)) -- 2.19.1