diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-12-29 18:24:56 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-12-30 02:58:05 +0000 |
commit | aaf709da67942087470f98f0fc5ba92faf15176a (patch) | |
tree | 833aa763abfdec511b866bcc9630839ed2be78e7 /ui/cli/tap-rtd.c | |
parent | b0da9cf6d4f246e5fdf81466adc9532ab09aa8f8 (diff) |
Use cmdarg_err() to report errors in CLI taps.
Change-Id: Ic6b35220e394f8c67848ed067e4bbddb980d5bc0
Reviewed-on: https://code.wireshark.org/review/31253
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Diffstat (limited to 'ui/cli/tap-rtd.c')
-rw-r--r-- | ui/cli/tap-rtd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/cli/tap-rtd.c b/ui/cli/tap-rtd.c index 5898cd30f2..d86fded52c 100644 --- a/ui/cli/tap-rtd.c +++ b/ui/cli/tap-rtd.c @@ -19,6 +19,7 @@ #include <epan/rtd_table.h> #include <epan/timestamp.h> #include <epan/stat_tap_ui.h> +#include <wsutil/cmdarg_err.h> #include <ui/cli/tshark-tap.h> typedef struct _rtd_t { @@ -104,7 +105,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter) error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &ui->rtd, filter, 0, NULL, get_rtd_packet_func(rtd), rtd_draw, NULL); if (error_string) { free_rtd_table(&ui->rtd.stat_table); - fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str); + cmdarg_err("Couldn't register srt tap: %s", error_string->str); g_string_free(error_string, TRUE); exit(1); } @@ -120,7 +121,7 @@ dissector_rtd_init(const char *opt_arg, void* userdata) rtd_table_get_filter(rtd, opt_arg, &filter, &err); if (err != NULL) { - fprintf(stderr, "tshark: %s\n", err); + cmdarg_err("%s", err); g_free(err); exit(1); } |