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-isoclns.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-isoclns.c')
-rw-r--r-- | print-isoclns.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/print-isoclns.c b/print-isoclns.c index 96a16bc3..6bbe75c3 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -1712,19 +1712,19 @@ isis_print_id(netdissect_options *ndo, const uint8_t *cp, u_int id_len) if (sysid_len > id_len) sysid_len = id_len; for (i = 1; i <= sysid_len; i++) { - nd_snprintf(pos, sizeof(id) - (pos - id), "%02x", GET_U_1(cp)); + snprintf(pos, sizeof(id) - (pos - id), "%02x", GET_U_1(cp)); cp++; pos += strlen(pos); if (i == 2 || i == 4) *pos++ = '.'; } if (id_len >= NODE_ID_LEN) { - nd_snprintf(pos, sizeof(id) - (pos - id), ".%02x", GET_U_1(cp)); + snprintf(pos, sizeof(id) - (pos - id), ".%02x", GET_U_1(cp)); cp++; pos += strlen(pos); } if (id_len == LSP_ID_LEN) - nd_snprintf(pos, sizeof(id) - (pos - id), "-%02x", GET_U_1(cp)); + snprintf(pos, sizeof(id) - (pos - id), "-%02x", GET_U_1(cp)); return (id); } @@ -1913,7 +1913,7 @@ isis_print_ext_is_reach(netdissect_options *ndo, if (subtlv_sum_len) { ND_PRINT(" (%u)", subtlv_sum_len); /* prepend the indent string */ - nd_snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident); + snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident); ident = ident_buffer; while (subtlv_sum_len != 0) { ND_TCHECK_2(tptr); @@ -2246,7 +2246,7 @@ isis_print_extd_ip_reach(netdissect_options *ndo, subtlvlen=GET_U_1(tptr + 1); tptr+=2; /* prepend the indent string */ - nd_snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident); + snprintf(ident_buffer, sizeof(ident_buffer), "%s ",ident); if (!isis_print_ip_reach_subtlv(ndo, tptr, subtlvtype, subtlvlen, ident_buffer)) return(0); tptr+=subtlvlen; |