diff options
author | Martin Mathieson <martin.mathieson@keysight.com> | 2022-11-20 21:18:22 +0000 |
---|---|---|
committer | Martin Mathieson <martin.mathieson@keysight.com> | 2022-11-22 20:55:24 +0000 |
commit | 793365d0e04e43c823521297641bc6ad0ffb6ff1 (patch) | |
tree | 2cf2e193e9a0b390a6e58a77ce9e388fd4cc905f /wiretap/logcat.c | |
parent | ec353e89f321487dfad19d4dcf1d68ff38d47a0f (diff) |
Fix some issues seen with cppcheck
Diffstat (limited to 'wiretap/logcat.c')
-rw-r--r-- | wiretap/logcat.c | 17 |
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; } } |