X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ee68aa36460d7efeca48747f33b7f2adc0900bfb..41ef9cfe38f86553ffd8f61b6f87e9c00baf5f07:/print-babel.c diff --git a/print-babel.c b/print-babel.c index 29865dd2..5f1d90f0 100644 --- a/print-babel.c +++ b/print-babel.c @@ -111,7 +111,7 @@ static const char * format_id(netdissect_options *ndo, const u_char *id) { static char buf[25]; - nd_snprintf(buf, 25, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", + snprintf(buf, 25, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", GET_U_1(id), GET_U_1(id + 1), GET_U_1(id + 2), GET_U_1(id + 3), GET_U_1(id + 4), GET_U_1(id + 5), GET_U_1(id + 6), GET_U_1(id + 7)); @@ -127,9 +127,9 @@ format_prefix(netdissect_options *ndo, const u_char *prefix, unsigned char plen) { static char buf[50]; if(plen >= 96 && memcmp(prefix, v4prefix, 12) == 0) - nd_snprintf(buf, 50, "%s/%u", ipaddr_string(ndo, prefix + 12), plen - 96); + snprintf(buf, 50, "%s/%u", ipaddr_string(ndo, prefix + 12), plen - 96); else - nd_snprintf(buf, 50, "%s/%u", ip6addr_string(ndo, prefix), plen); + snprintf(buf, 50, "%s/%u", ip6addr_string(ndo, prefix), plen); buf[49] = '\0'; return buf; } @@ -150,7 +150,7 @@ format_interval(const uint16_t i) if (i == 0) return "0.0s (bogus)"; - nd_snprintf(buf, sizeof(buf), "%u.%02us", i / 100, i % 100); + snprintf(buf, sizeof(buf), "%u.%02us", i / 100, i % 100); return buf; } @@ -164,7 +164,7 @@ static const char * format_timestamp(const uint32_t i) { static char buf[sizeof("0000.000000s")]; - nd_snprintf(buf, sizeof(buf), "%u.%06us", i / 1000000, i % 1000000); + snprintf(buf, sizeof(buf), "%u.%06us", i / 1000000, i % 1000000); return buf; } @@ -364,7 +364,8 @@ babel_print_v2(netdissect_options *ndo, i = 0; while(i < bodylen) { const u_char *message; - u_int type, len; + uint8_t type; + u_int len; message = cp + 4 + i;