X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/33ceecfd2f8fc5f12942c9e6996173424cf5bcac..c518a9aab149da1a6b83c0cbeddaff5265d05dcb:/print-radius.c diff --git a/print-radius.c b/print-radius.c index 8c33438f..c87fa900 100644 --- a/print-radius.c +++ b/print-radius.c @@ -845,7 +845,6 @@ print_vendor_attr(netdissect_options *ndo, if (length < 4) goto trunc; - ND_TCHECK_4(data); vendor_id = GET_BE_U_4(data); data+=4; length-=4; @@ -855,8 +854,6 @@ print_vendor_attr(netdissect_options *ndo, vendor_id); while (length >= 2) { - ND_TCHECK_2(data); - vendor_type = GET_U_1(data); vendor_length = GET_U_1(data + 1); @@ -911,7 +908,6 @@ print_attr_num(netdissect_options *ndo, return; } - ND_TCHECK_4(data); /* This attribute has standard values */ if (attr_type[attr_code].siz_subtypes) { @@ -1008,11 +1004,6 @@ print_attr_num(netdissect_options *ndo, } /* switch */ } /* if-else */ - - return; - - trunc: - nd_print_trunc(ndo); } /*****************************/ @@ -1032,8 +1023,6 @@ print_attr_address(netdissect_options *ndo, return; } - ND_TCHECK_4(data); - switch(attr_code) { case FRM_IPADDR: @@ -1051,11 +1040,6 @@ print_attr_address(netdissect_options *ndo, ND_PRINT("%s", GET_IPADDR_STRING(data)); break; } - - return; - - trunc: - nd_print_trunc(ndo); } /*****************************/ @@ -1075,14 +1059,7 @@ print_attr_address6(netdissect_options *ndo, return; } - ND_TCHECK_16(data); - ND_PRINT("%s", GET_IP6ADDR_STRING(data)); - - return; - - trunc: - nd_print_trunc(ndo); } static void @@ -1158,7 +1135,7 @@ print_attr_operator_name(netdissect_options *ndo, data++; ND_PRINT("[%s] ", tok2str(operator_name_vector, "unknown namespace %u", namespace_value)); - nd_printn(ndo, data, length - 1, NULL); + (void)nd_printn(ndo, data, length - 1, NULL); return; @@ -1206,7 +1183,7 @@ print_attr_location_information(netdissect_options *ndo, data += 8; ND_PRINT("method \""); - nd_printn(ndo, data, length - 20, NULL); + (void)nd_printn(ndo, data, length - 20, NULL); ND_PRINT("\""); return; @@ -1270,7 +1247,7 @@ print_basic_location_policy_rules(netdissect_options *ndo, if (length > 10) { ND_PRINT(", note well \""); - nd_printn(ndo, data, length - 10, NULL); + (void)nd_printn(ndo, data, length - 10, NULL); ND_PRINT("\""); } @@ -1302,17 +1279,11 @@ print_attr_time(netdissect_options *ndo, return; } - ND_TCHECK_4(data); - attr_time = GET_BE_U_4(data); strlcpy(string, ctime(&attr_time), sizeof(string)); /* Get rid of the newline */ string[24] = '\0'; ND_PRINT("%.24s", string); - return; - - trunc: - nd_print_trunc(ndo); } static void @@ -1343,8 +1314,6 @@ print_attr_vector64(netdissect_options *ndo, } ND_PRINT("]"); - - return; } /***********************************/ @@ -1386,13 +1355,11 @@ print_attr_strange(netdissect_options *ndo, ND_PRINT("ERROR: length %u != 14", length); return; } - ND_TCHECK_1(data); if (GET_U_1(data)) ND_PRINT("User can change password"); else ND_PRINT("User cannot change password"); data++; - ND_TCHECK_1(data); ND_PRINT(", Min password length: %u", GET_U_1(data)); data++; ND_PRINT(", created at: "); @@ -1426,7 +1393,6 @@ print_attr_strange(netdissect_options *ndo, ND_PRINT("Error: length %u != 4", length); return; } - ND_TCHECK_4(data); error_cause_value = GET_BE_U_4(data); ND_PRINT("Error cause %u: %s", error_cause_value, tok2str(errorcausetype, "Error-Cause %u not known", error_cause_value));