adb service/logcat : fix Consider inspecting this expression. The expression is excessive or contains a misprint found by PVS Studio (V590)

Change-Id: I59cf9c8b2aab347023dea323602dd6ff85ac7ab6
Reviewed-on: https://code.wireshark.org/review/12309
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Alexis La Goutte 2015-11-30 17:26:30 +01:00 committed by Anders Broman
parent 83516dce1a
commit d59335b906
2 changed files with 2 additions and 2 deletions

View File

@ -494,7 +494,7 @@ dissect_adb_service(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
payload_length = tvb_get_letohs(next_tvb, i_offset);
try_header_size = tvb_get_letohs(next_tvb, i_offset + 2);
if (try_header_size == 0 || try_header_size != 24)
if (try_header_size != 24)
logcat_length = payload_length + 20;
else
logcat_length = payload_length + 24;

View File

@ -83,7 +83,7 @@ static gint detect_version(tvbuff_t *tvb, gint offset) {
payload_length = tvb_get_letohs(tvb, offset);
try_header_size = tvb_get_letohs(tvb, offset + 2);
if (try_header_size == 0 || try_header_size != 24)
if (try_header_size != 24)
return 1;
if (tvb_reported_length_remaining(tvb, offset + 24 + payload_length) >= 0)