summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/file_access.c5
-rw-r--r--wiretap/wtap.c2
2 files changed, 7 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);
}
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index 731ab26091..dd7d5aed9c 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -1050,6 +1050,8 @@ wtap_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
wth->phdr.pkt_encap = wth->file_encap;
wth->phdr.pkt_tsprec = wth->file_tsprec;
+ *err = 0;
+ *err_info = NULL;
if (!wth->subtype_read(wth, err, err_info, data_offset)) {
/*
* If we didn't get an error indication, we read