From: fxlb Date: Wed, 5 Feb 2014 20:08:41 +0000 (+0100) Subject: print-802_11: cleanup handle_deauth() X-Git-Tag: tcpdump-4.6.0~234 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/2e724cd38ed326ae183db607f6bd728ec11e8532 print-802_11: cleanup handle_deauth() - variable 'offset' is assigned a value that is never used - parameter 'length' is updated and the new value is never used --- diff --git a/print-802_11.c b/print-802_11.c index e08258bb..56ef0439 100644 --- a/print-802_11.c +++ b/print-802_11.c @@ -1781,7 +1781,6 @@ static int handle_deauth(const struct mgmt_header_t *pmh, const u_char *p, u_int length) { struct mgmt_body_t pbody; - int offset = 0; const char *reason = NULL; memset(&pbody, 0, sizeof(pbody)); @@ -1791,8 +1790,6 @@ handle_deauth(const struct mgmt_header_t *pmh, const u_char *p, u_int length) if (length < IEEE802_11_REASON_LEN) return 0; pbody.reason_code = EXTRACT_LE_16BITS(p); - offset += IEEE802_11_REASON_LEN; - length -= IEEE802_11_REASON_LEN; reason = (pbody.reason_code < NUM_REASONS) ? reason_text[pbody.reason_code]