diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-08-08 22:39:54 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-08-08 23:21:35 -0700 |
commit | 1ed63b5d0630a4b5b4a8d31174d9f3e95a970913 (patch) | |
tree | 47373d65dd7495380858f848fda5368d1dcb180c /print-sunrpc.c | |
parent | dfcccf43766e22aec8793b0a3f963d5ec5a52b80 (diff) | |
download | tcpdump-1ed63b5d0630a4b5b4a8d31174d9f3e95a970913.tar.gz |
Remove more old-compiler compensation.
We require an environment with a C99-compatible snprintf(), so we don't
need to work around older implementations. Make the configuration
process fail if we don't have snprintf() and vsnprintf().
We require at least VS 2015, so we don't have to check for _MSC_VER >=
1400. Make the build fail if we don't have at least VS 2015.
We apparently do, however, have to use __inline, as the VS 2015
documentation doesn't meaning plain old "inline". Update a comment.
Diffstat (limited to 'print-sunrpc.c')
-rw-r--r-- | print-sunrpc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/print-sunrpc.c b/print-sunrpc.c index 773e8b56..94b86707 100644 --- a/print-sunrpc.c +++ b/print-sunrpc.c @@ -172,13 +172,13 @@ sunrpc_print(netdissect_options *ndo, const u_char *bp, ND_TCHECK_SIZE(rp); if (!ndo->ndo_nflag) { - nd_snprintf(srcid, sizeof(srcid), "0x%x", + snprintf(srcid, sizeof(srcid), "0x%x", GET_BE_U_4(rp->rm_xid)); strlcpy(dstid, "sunrpc", sizeof(dstid)); } else { - nd_snprintf(srcid, sizeof(srcid), "0x%x", + snprintf(srcid, sizeof(srcid), "0x%x", GET_BE_U_4(rp->rm_xid)); - nd_snprintf(dstid, sizeof(dstid), "0x%x", SUNRPC_PMAPPORT); + snprintf(dstid, sizeof(dstid), "0x%x", SUNRPC_PMAPPORT); } switch (IP_V((const struct ip *)bp2)) { @@ -240,7 +240,7 @@ progstr(uint32_t prog) rp = getrpcbynumber(prog); if (rp == NULL) #endif - (void) nd_snprintf(buf, sizeof(buf), "#%u", prog); + (void) snprintf(buf, sizeof(buf), "#%u", prog); #if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) else strlcpy(buf, rp->r_name, sizeof(buf)); |