Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2018 14:53:34 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329018 - in head: lib/libc/rpc usr.sbin/ypserv
Message-ID:  <201802081453.w18ErYam062228@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Thu Feb  8 14:53:34 2018
New Revision: 329018
URL: https://svnweb.freebsd.org/changeset/base/329018

Log:
  su_data: correct macro expansion.
  
  Protect su_data() users from strange macro expansion.
  
  Obtained from:	linux libtirpc

Modified:
  head/lib/libc/rpc/svc_dg.c
  head/usr.sbin/ypserv/yp_svc_udp.c

Modified: head/lib/libc/rpc/svc_dg.c
==============================================================================
--- head/lib/libc/rpc/svc_dg.c	Thu Feb  8 14:39:07 2018	(r329017)
+++ head/lib/libc/rpc/svc_dg.c	Thu Feb  8 14:53:34 2018	(r329018)
@@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
 #include "rpc_com.h"
 #include "mt_misc.h"
 
-#define	su_data(xprt)	((struct svc_dg_data *)(xprt->xp_p2))
+#define	su_data(xprt)	((struct svc_dg_data *)((xprt)->xp_p2))
 #define	rpc_buffer(xprt) ((xprt)->xp_p1)
 
 #ifndef MAX

Modified: head/usr.sbin/ypserv/yp_svc_udp.c
==============================================================================
--- head/usr.sbin/ypserv/yp_svc_udp.c	Thu Feb  8 14:39:07 2018	(r329017)
+++ head/usr.sbin/ypserv/yp_svc_udp.c	Thu Feb  8 14:53:34 2018	(r329018)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <rpc/svc_dg.h>
 #include "yp_extern.h"
 
-#define su_data(xprt)	((struct svc_dg_data *)(xprt->xp_p2))
+#define	su_data(xprt)	((struct svc_dg_data *)((xprt)->xp_p2))
 
 /*
  * We need to be able to manually set the transaction ID in the



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802081453.w18ErYam062228>