diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2021-03-28 13:22:48 +0100 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2021-03-28 13:22:48 +0100 |
commit | 459fdf8fbdc60ec0808190c1882d5ec1bcbc91fb (patch) | |
tree | 7f8a59b6b02a9e86acc335bd7256185b62c0ffe5 | |
parent | 5ee4e508deb94d0a8a0268cd72fd66dcfc680eb5 (diff) | |
download | tcpdump-459fdf8fbdc60ec0808190c1882d5ec1bcbc91fb.tar.gz |
Lose a few forward declarations in print.c.
-rw-r--r-- | print.c | 29 |
1 files changed, 6 insertions, 23 deletions
@@ -246,21 +246,6 @@ static const struct printer printers[] = { { NULL, 0 }, }; -static void ndo_default_print(netdissect_options *ndo, const u_char *bp, - u_int length); - -static void NORETURN ndo_error(netdissect_options *ndo, - status_exit_codes_t status, - FORMAT_STRING(const char *fmt), ...) - PRINTFLIKE(3, 4); -static void ndo_warning(netdissect_options *ndo, - FORMAT_STRING(const char *fmt), ...) - PRINTFLIKE(2, 3); - -static int ndo_printf(netdissect_options *ndo, - FORMAT_STRING(const char *fmt), ...) - PRINTFLIKE(2, 3); - void init_print(netdissect_options *ndo, uint32_t localnet, uint32_t mask) { @@ -505,10 +490,9 @@ ndo_default_print(netdissect_options *ndo, const u_char *bp, u_int length) hex_and_ascii_print(ndo, "\n\t", bp, length); /* pass on lf and indentation string */ } -/* VARARGS */ -static void +static void NORETURN PRINTFLIKE(3, 4) ndo_error(netdissect_options *ndo, status_exit_codes_t status, - const char *fmt, ...) + FORMAT_STRING(const char *fmt), ...) { va_list ap; @@ -527,9 +511,8 @@ ndo_error(netdissect_options *ndo, status_exit_codes_t status, /* NOTREACHED */ } -/* VARARGS */ -static void -ndo_warning(netdissect_options *ndo, const char *fmt, ...) +static void PRINTFLIKE(2, 3) +ndo_warning(netdissect_options *ndo, FORMAT_STRING(const char *fmt), ...) { va_list ap; @@ -546,8 +529,8 @@ ndo_warning(netdissect_options *ndo, const char *fmt, ...) } } -static int -ndo_printf(netdissect_options *ndo, const char *fmt, ...) +static int PRINTFLIKE(2, 3) +ndo_printf(netdissect_options *ndo, FORMAT_STRING(const char *fmt), ...) { va_list args; int ret; |