diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-17 20:03:47 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-18 04:04:19 +0000 |
commit | 0885d2945103236f7f475963f66048291f0b18f1 (patch) | |
tree | 2c165dd89f97ee9cc33d39f9b7a62840e0ab269b /wiretap/file_access.c | |
parent | 6011a047d3cd2aba84e7fdd3bf7e8403a2f3563b (diff) | |
download | wireshark-0885d2945103236f7f475963f66048291f0b18f1.tar.gz |
Make sure err_info is always set, and print it iff it's non-null.
Change-Id: Ib5c600c491a3d8adcfa91c00fa9445283610545b
Reviewed-on: https://code.wireshark.org/review/5830
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r-- | wiretap/file_access.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index c475ffd6a6..730698b919 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -726,6 +726,9 @@ wtap_open_offline(const char *filename, unsigned int type, int *err, char **err_ gboolean use_stdin = FALSE; gchar *extension; + *err = 0; + *err_info = NULL; + init_open_routines(); /* open standard input if filename is '-' */ @@ -2318,6 +2321,8 @@ gboolean wtap_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, const guint8 *pd, int *err, gchar **err_info) { + *err = 0; + *err_info = NULL; return (wdh->subtype_write)(wdh, phdr, pd, err, err_info); } |