diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-04-08 21:08:54 +0200 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-04-09 08:05:39 +0000 |
commit | d65f8961dc1caa7aca92c3d1c7b797196a992486 (patch) | |
tree | 2107cfbf9158da70a0c382650299d036c80eb647 /extcap | |
parent | 66f7f6eec8663118fd7925b738f3e0060efccae5 (diff) | |
download | wireshark-d65f8961dc1caa7aca92c3d1c7b797196a992486.tar.gz wireshark-d65f8961dc1caa7aca92c3d1c7b797196a992486.tar.bz2 wireshark-d65f8961dc1caa7aca92c3d1c7b797196a992486.zip |
Androiddump: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I245ebb47dfc3d202cba5f63c33fca9c0e30da0ad
Reviewed-on: https://code.wireshark.org/review/7984
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/androiddump.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c index 9676a39e58..660652621a 100644 --- a/extcap/androiddump.c +++ b/extcap/androiddump.c @@ -1121,10 +1121,10 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo, if (hex == 0x01) { hex_data = new_hex_data; - hex = strtol(hex_data, &new_hex_data, 16); + strtol(hex_data, &new_hex_data, 16); hex_data = new_hex_data; - hex = strtol(hex_data, &new_hex_data, 16); + strtol(hex_data, &new_hex_data, 16); hex_data = new_hex_data; hex = strtol(hex_data, &new_hex_data, 16); @@ -1132,7 +1132,7 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo, raw_length = hex + 4; } else if (hex == 0x04) { hex_data = new_hex_data; - hex = strtol(hex_data, &new_hex_data, 16); + strtol(hex_data, &new_hex_data, 16); hex_data = new_hex_data; hex = strtol(hex_data, &new_hex_data, 16); @@ -1140,10 +1140,10 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo, raw_length = hex +3; } else if (hex == 0x02) { hex_data = new_hex_data; - hex = strtol(hex_data, &new_hex_data, 16); + strtol(hex_data, &new_hex_data, 16); hex_data = new_hex_data; - hex = strtol(hex_data, &new_hex_data, 16); + strtol(hex_data, &new_hex_data, 16); hex_data = new_hex_data; hex = strtol(hex_data, &new_hex_data, 16); @@ -1160,7 +1160,6 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo, } } else { used_buffer_length += length; - length = 0; break; } @@ -1168,7 +1167,6 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo, if (used_buffer_length + length < frame_length) { used_buffer_length += length; - length = 0; break; } @@ -1185,7 +1183,7 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo, date.tm_year -= 1900; ts = mktime(&date); - hex_data = new_hex_data = data + 29; + new_hex_data = data + 29; } captured_length = 0; |