diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-04-20 14:25:59 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-04-20 21:26:29 +0000 |
commit | 3dd274cddcc585b5c549464776989548f6d14883 (patch) | |
tree | 95621039162be61e8c64782fdf969001284cd2d5 /randpkt_core/randpkt_core.c | |
parent | 804d3f62454895c1560a690728b859f68ee35bf6 (diff) |
Use more of the cfile_ failure message routines.
Change-Id: Iceb15f15622d391da0332e6ed55aac0e74abd0e2
Reviewed-on: https://code.wireshark.org/review/21261
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'randpkt_core/randpkt_core.c')
-rw-r--r-- | randpkt_core/randpkt_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |