diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-10-07 12:49:14 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-10-07 19:50:08 +0000 |
commit | 71550ba98a38508ae90df43bddd0644b2df2f717 (patch) | |
tree | 32705bb55493a9bbef53a9683d08d5170f71446e /wiretap/packetlogger.c | |
parent | d98debe6d04e3b2a07c8c9a03ad3a4de54ccbc27 (diff) | |
download | wireshark-71550ba98a38508ae90df43bddd0644b2df2f717.tar.gz |
Make the code a bit more like the pre-new-APIs code.
Change-Id: I40282d8825936d24480c9b77e2e7d9374b1de6b5
Reviewed-on: https://code.wireshark.org/review/4534
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/packetlogger.c')
-rw-r--r-- | wiretap/packetlogger.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/wiretap/packetlogger.c b/wiretap/packetlogger.c index 8526cddada..c8235fd5f8 100644 --- a/wiretap/packetlogger.c +++ b/wiretap/packetlogger.c @@ -67,14 +67,9 @@ int packetlogger_open(wtap *wth, int *err, gchar **err_info) } if (!wtap_read_bytes(wth->fh, &type, 1, err, err_info)) { - if (*err == WTAP_ERR_SHORT_READ) { - /* - * Not enough bytes for the packet, so not a - * packetlogger file. - */ - return 0; - } - return -1; + if (*err != WTAP_ERR_SHORT_READ) + return -1; + return 0; } /* Verify this file belongs to us */ |