aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/logcat.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.mathieson@keysight.com>2022-11-20 21:18:22 +0000
committerMartin Mathieson <martin.mathieson@keysight.com>2022-11-22 20:55:24 +0000
commit793365d0e04e43c823521297641bc6ad0ffb6ff1 (patch)
tree2cf2e193e9a0b390a6e58a77ce9e388fd4cc905f /wiretap/logcat.c
parentec353e89f321487dfad19d4dcf1d68ff38d47a0f (diff)
Fix some issues seen with cppcheck
Diffstat (limited to 'wiretap/logcat.c')
-rw-r--r--wiretap/logcat.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/wiretap/logcat.c b/wiretap/logcat.c
index f4f8bef6d6..da4d13e006 100644
--- a/wiretap/logcat.c
+++ b/wiretap/logcat.c
@@ -267,15 +267,14 @@ wtap_open_return_val logcat_open(wtap *wth, int *err, gchar **err_info)
return WTAP_OPEN_ERROR; /* I/O error */
if (tmp_version == 0)
return WTAP_OPEN_NOT_MINE; /* not a logcat file */
- if (tmp_version != -2) {
- /*
- * we've read three packets and the first two have the same
- * version; does the third have the same version?
- */
- if (tmp_version != version) {
- /* no, so this is presumably not a logcat file */
- return WTAP_OPEN_NOT_MINE;
- }
+
+ /*
+ * we've read three packets and the first two have the same
+ * version; does the third have the same version?
+ */
+ if (tmp_version != version) {
+ /* no, so this is presumably not a logcat file */
+ return WTAP_OPEN_NOT_MINE;
}
}