diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-12-10 22:49:21 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-12-10 22:52:57 +0100 |
commit | 2eb023747062b79164c8f34adbf893bec938dd9a (patch) | |
tree | aa9dbaa22a99ba333242215bbfb2e232cc837f4d /util-print.c | |
parent | d9893474ee1284e8772474c26ba0830657d4f33d (diff) | |
download | tcpdump-2eb023747062b79164c8f34adbf893bec938dd9a.tar.gz |
Remove the no more used nd_printzp() function
The function to use now is: nd_printjnp().
(Added by comit 635e3cc92b72ca048a6b5b89b883980e4e1b4bdc)
Diffstat (limited to 'util-print.c')
-rw-r--r-- | util-print.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/util-print.c b/util-print.c index 3d3caa5a..f9ea618d 100644 --- a/util-print.c +++ b/util-print.c @@ -199,36 +199,6 @@ nd_printn(netdissect_options *ndo, } /* - * Print out a null-padded filename (or other ASCII string), part of - * the packet buffer. - * If ep is NULL, assume no truncation check is needed. - * Return true if truncated. - * Stop at ep (if given) or after n bytes or before the null char, - * whichever is first. - */ -int -nd_printzp(netdissect_options *ndo, - const u_char *s, u_int n, - const u_char *ep) -{ - int ret; - u_char c; - - ret = 1; /* assume truncated */ - while (n > 0 && (ep == NULL || s < ep)) { - n--; - c = GET_U_1(s); - s++; - if (c == '\0') { - ret = 0; - break; - } - fn_print_char(ndo, c); - } - return (n == 0) ? 0 : ret; -} - -/* * Print a null-padded filename (or other ASCII string), part of * the packet buffer, filtering out non-printable characters. * Stop if truncated (via GET_U_1/longjmp) or after n bytes or before |