svn commit: r329018 - in head: lib/libc/rpc usr.sbin/ypserv
Pedro F. Giffuni
pfg at FreeBSD.org
Thu Feb 8 14:53:35 UTC 2018
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
More information about the svn-src-all
mailing list