]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Update tok2strbuf() to a static function
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 18 Jan 2022 10:09:38 +0000 (11:09 +0100)
committerGuy Harris <[email protected]>
Sun, 20 Mar 2022 01:03:36 +0000 (18:03 -0700)
It is only used in util-print.c.

(cherry picked from commit f5060b06131ac0b7b1876abdef2815bf96e0ce9a)

netdissect.h
util-print.c

index 591d2b8aaa6ec6943b41abb6d18d07e8a625cabf..a3c92586185706ebb493d01f5a38b0711d003143 100644 (file)
@@ -140,9 +140,6 @@ struct tok {
        const char *s;          /* string */
 };
 
-extern const char *tok2strbuf(const struct tok *, const char *, u_int,
-                             char *buf, size_t bufsize);
-
 /* tok2str is deprecated */
 extern const char *tok2str(const struct tok *, const char *, u_int);
 extern char *bittok2str(const struct tok *, const char *, u_int);
index 6f8f61d1433b8ec7dc21105561ffcf0d0c9f0b5f..2e3bc24df06445efbe3a1c0b577a2085765e3e72 100644 (file)
@@ -458,7 +458,7 @@ print_unknown_data(netdissect_options *ndo, const u_char *cp,
 /*
  * Convert a token value to a string; use "fmt" if not found.
  */
-const char *
+static const char *
 tok2strbuf(const struct tok *lp, const char *fmt,
           u_int v, char *buf, size_t bufsize)
 {