aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-02-04 15:18:23 -0800
committerGuy Harris <guy@alum.mit.edu>2018-02-04 23:18:58 +0000
commit444cac45b2f845dc0e0baf9110b8ad5b9bd2709d (patch)
tree1c1c660e6837989818018adec18ccebc08009237 /wiretap
parenta44eece9aaea9a4e6a854d7897fc0c4cebf65084 (diff)
valid_but_empty_file is a Boolean, so declare it as such.
If it's either going to be -1 or 1, and any value > 0 is "valid but empty", that's just a Boolean, with -1 corresponding to false and 1 corresponding to true. Make it so. Change-Id: Ib7418fe7573b5d2cd1e2ef5de601c0262c8d9de1 Reviewed-on: https://code.wireshark.org/review/25605 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/vwr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index 8687541cd7..209c3e798b 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -966,7 +966,7 @@ static int vwr_get_fpga_version(wtap *wth, int *err, gchar **err_info)
int f_len, v_type;
guint16 data_length = 0;
guint16 fpga_version;
- int valid_but_empty_file = -1;
+ gboolean valid_but_empty_file = FALSE;
filePos = file_tell(wth->fh);
if (filePos == -1) {
@@ -1003,7 +1003,7 @@ static int vwr_get_fpga_version(wtap *wth, int *err, gchar **err_info)
return -1;
}
else if (v_type == VT_CPMSG)
- valid_but_empty_file = 1;
+ valid_but_empty_file = TRUE;
}
else {
rec_size = f_len;
@@ -1102,7 +1102,7 @@ static int vwr_get_fpga_version(wtap *wth, int *err, gchar **err_info)
}
/* Is this a valid but empty file? If so, claim it's the S3_W_FPGA FPGA. */
- if (valid_but_empty_file > 0) {
+ if (valid_but_empty_file) {
g_free(rec);
return(S3_W_FPGA);
}