Module Name: src
Committed By: plunky
Date: Thu Feb 24 18:35:40 UTC 2011
Modified Files:
src/sys/dist/ipf/netinet: ip_rpcb_pxy.c
Log Message:
avoid #ifdef/#endif inside sprint() argument list, as with USE_FORT=yes
sprint becomes a macro
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dist/ipf/netinet/ip_rpcb_pxy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dist/ipf/netinet/ip_rpcb_pxy.c
diff -u src/sys/dist/ipf/netinet/ip_rpcb_pxy.c:1.14 src/sys/dist/ipf/netinet/ip_rpcb_pxy.c:1.15
--- src/sys/dist/ipf/netinet/ip_rpcb_pxy.c:1.14 Wed Aug 19 08:36:12 2009
+++ src/sys/dist/ipf/netinet/ip_rpcb_pxy.c Thu Feb 24 18:35:40 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_rpcb_pxy.c,v 1.14 2009/08/19 08:36:12 darrenr Exp $ */
+/* $NetBSD: ip_rpcb_pxy.c,v 1.15 2011/02/24 18:35:40 plunky Exp $ */
/*
* Copyright (C) 2002-2003 by Ryan Beasley <[email protected]>
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: ip_rpcb_pxy.c,v 1.14 2009/08/19 08:36:12 darrenr Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ip_rpcb_pxy.c,v 1.15 2011/02/24 18:35:40 plunky Exp $");
#define IPF_RPCB_PROXY
@@ -793,11 +793,13 @@
bzero(uaddr, sizeof(uaddr)); /* Just in case we need padding. */
#if defined(SNPRINTF) && defined(_KERNEL)
SNPRINTF(uaddr, sizeof(uaddr),
+ "%u.%u.%u.%u.%u.%u", i[0] & 0xff, i[1] & 0xff,
+ i[2] & 0xff, i[3] & 0xff, p[0] & 0xff, p[1] & 0xff);
#else
(void) sprintf(uaddr,
-#endif
"%u.%u.%u.%u.%u.%u", i[0] & 0xff, i[1] & 0xff,
i[2] & 0xff, i[3] & 0xff, p[0] & 0xff, p[1] & 0xff);
+#endif
len = strlen(uaddr);
xlen = XDRALIGN(len);
@@ -1323,11 +1325,13 @@
bzero(uaddr, sizeof(uaddr)); /* Just in case we need padding. */
#if defined(SNPRINTF) && defined(_KERNEL)
SNPRINTF(uaddr, sizeof(uaddr),
+ "%u.%u.%u.%u.%u.%u", i[0] & 0xff, i[1] & 0xff,
+ i[2] & 0xff, i[3] & 0xff, p[0] & 0xff, p[1] & 0xff);
#else
(void) sprintf(uaddr,
-#endif
"%u.%u.%u.%u.%u.%u", i[0] & 0xff, i[1] & 0xff,
i[2] & 0xff, i[3] & 0xff, p[0] & 0xff, p[1] & 0xff);
+#endif
len = strlen(uaddr);
xlen = XDRALIGN(len);
@@ -1403,12 +1407,15 @@
padding. */
#if defined(SNPRINTF) && defined(_KERNEL)
SNPRINTF(uaddr, sizeof(uaddr),
+ "%u.%u.%u.%u.%u.%u", i[0] & 0xff,
+ i[1] & 0xff, i[2] & 0xff, i[3] & 0xff,
+ p[0] & 0xff, p[1] & 0xff);
#else
(void) sprintf(uaddr,
-#endif
"%u.%u.%u.%u.%u.%u", i[0] & 0xff,
i[1] & 0xff, i[2] & 0xff, i[3] & 0xff,
p[0] & 0xff, p[1] & 0xff);
+#endif
len = strlen(uaddr);
xlen = XDRALIGN(len);