]> The Tcpdump Group git mirrors - tcpdump/commitdiff
print-802_11: cleanup handle_deauth()
authorfxlb <[email protected]>
Wed, 5 Feb 2014 20:08:41 +0000 (21:08 +0100)
committerfxlb <[email protected]>
Wed, 5 Feb 2014 20:08:41 +0000 (21:08 +0100)
- variable 'offset' is assigned a value that is never used
- parameter 'length' is updated and the new value is never used

print-802_11.c

index e08258bba9638d9b4bff91bbb6c36352a47970d2..56ef04395b4c71f499bcee4ceb1b7f1345383549 100644 (file)
@@ -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]