aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/vwr.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/vwr.c')
-rw-r--r--wiretap/vwr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index 573ff5f0bf..f932a5bbdf 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -899,9 +899,9 @@ static int vwr_get_fpga_version(wtap *wth, int *err, gchar **err_info)
/* if we don't get it all, assume this isn't a vwr file */
if (file_read(rec, rec_size, wth->fh) != rec_size) {
*err = file_error(wth->fh, err_info);
- if (*err == 0)
- return(UNKNOWN_FPGA); /* short read - not a vwr file */
- return(-1);
+ if (*err != 0 && *err != WTAP_ERR_SHORT_READ)
+ return(-1);
+ return(UNKNOWN_FPGA); /* short read - not a vwr file */
}
@@ -983,9 +983,9 @@ static int vwr_get_fpga_version(wtap *wth, int *err, gchar **err_info)
}
*err = file_error(wth->fh, err_info);
- if (*err == 0)
- return(UNKNOWN_FPGA); /* short read - not a vwr file */
- return(-1);
+ if (*err != 0 && *err != WTAP_ERR_SHORT_READ)
+ return(-1);
+ return(UNKNOWN_FPGA); /* short read - not a vwr file */
}
/* copy the actual packet data from the capture file into the target data block */