From 4611b8d48576060bd97662209f38b8a0264f3a40 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 7 Oct 2014 01:05:17 -0700 Subject: Make the code a bit more like the pre-API change code. Change-Id: I9a8bd2c7ce97993c1b72caf63254d024950f8b94 Reviewed-on: https://code.wireshark.org/review/4520 Reviewed-by: Guy Harris --- wiretap/iseries.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'wiretap/iseries.c') diff --git a/wiretap/iseries.c b/wiretap/iseries.c index b3074ca493..c6d3c36b99 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -212,12 +212,9 @@ iseries_open (wtap * wth, int *err, gchar ** err_info) errno = WTAP_ERR_CANT_READ; if (!wtap_read_bytes (wth->fh, &magic, sizeof magic, err, err_info)) { - if (*err == WTAP_ERR_SHORT_READ) - { - /* Not enough bytes for a magic string, so not an iSeries trace */ - return 0; - } - return -1; + if (*err != WTAP_ERR_SHORT_READ) + return -1; + return 0; } /* -- cgit v1.2.1