diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-09-20 11:53:51 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-09-20 18:54:17 +0000 |
commit | 10b33c06de6d5ff7f60fcac2656f42b973da3420 (patch) | |
tree | 089cc34569f1b49da62b3a1bfde9d48e27439553 | |
parent | 32c38a4ecc7fc4f07349b0fbc13f7754be897546 (diff) |
Remove file_error() calls after pcap_read_block() calls.
pcap_read_block() takes err and err_info arguments, and sets them on
error; no need to call file_error() if pcap_read_block() fails.
Change-Id: I33b96d31395bf7d66abdecbebd5cf775e8662004
Reviewed-on: https://code.wireshark.org/review/4209
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | wiretap/pcapng.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index b23c9c7e6f..2f05844bdf 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -2231,7 +2231,6 @@ pcapng_open(wtap *wth, int *err, gchar **err_info) bytes_read = pcapng_read_block(wth->fh, TRUE, &pn, &wblock, err, err_info); if (bytes_read <= 0) { pcapng_debug0("pcapng_open: couldn't read first SHB"); - *err = file_error(wth->fh, err_info); if (*err != 0 && *err != WTAP_ERR_SHORT_READ) return -1; return 0; @@ -2310,7 +2309,6 @@ pcapng_open(wtap *wth, int *err, gchar **err_info) } if (bytes_read <= 0) { pcapng_debug0("pcapng_open: couldn't read IDB"); - *err = file_error(wth->fh, err_info); if (*err == 0) *err = WTAP_ERR_SHORT_READ; return -1; |