From 3dd274cddcc585b5c549464776989548f6d14883 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 20 Apr 2017 14:25:59 -0700 Subject: Use more of the cfile_ failure message routines. Change-Id: Iceb15f15622d391da0332e6ed55aac0e74abd0e2 Reviewed-on: https://code.wireshark.org/review/21261 Reviewed-by: Guy Harris --- randpkt_core/randpkt_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'randpkt_core') diff --git a/randpkt_core/randpkt_core.c b/randpkt_core/randpkt_core.c index 10afdf9e17..20900c6279 100644 --- a/randpkt_core/randpkt_core.c +++ b/randpkt_core/randpkt_core.c @@ -641,8 +641,7 @@ gboolean randpkt_example_close(randpkt_example* example) gboolean ok = TRUE; if (!wtap_dump_close(example->dump, &err)) { - fprintf(stderr, "Error writing to %s: %s\n", - example->filename, wtap_strerror(err)); + cfile_close_failure_message(example->filename, err); ok = FALSE; } @@ -675,7 +674,8 @@ int randpkt_example_init(randpkt_example* example, char* produce_filename, int p example->filename = produce_filename; } if (!example->dump) { - fprintf(stderr, "randpkt: Error writing to %s\n", example->filename); + cfile_dump_open_failure_message("randpkt", produce_filename, + err, WTAP_FILE_TYPE_SUBTYPE_PCAP); return WRITE_ERROR; } -- cgit v1.2.3