summaryrefslogtreecommitdiff
path: root/print-hncp.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2017-09-15 11:57:50 +0100
committerDenis Ovsienko <denis@ovsienko.info>2017-09-15 11:57:50 +0100
commit7dd7b7e187b5cc34bd6afc941b03de46a3c8c12a (patch)
treefbb745d6d79719a66a57c1781e6d3ac2cb8df8f4 /print-hncp.c
parent14c81f0a4aa300f7ea23af6130469f97d8b18793 (diff)
downloadtcpdump-7dd7b7e187b5cc34bd6afc941b03de46a3c8c12a.tar.gz
HNCP: Declare some variables as uint8_t.
u_char and uint8_t are the same type, just use uint8_t for some variables and leave some no-op type casting out.
Diffstat (limited to 'print-hncp.c')
-rw-r--r--print-hncp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/print-hncp.c b/print-hncp.c
index 3a810037..280fecb5 100644
--- a/print-hncp.c
+++ b/print-hncp.c
@@ -265,7 +265,7 @@ dhcpv4_print(netdissect_options *ndo,
const u_char *cp, u_int length, int indent)
{
u_int i, t;
- const u_char *tlv, *value;
+ const uint8_t *tlv, *value;
uint8_t type, optlen;
i = 0;
@@ -273,8 +273,8 @@ dhcpv4_print(netdissect_options *ndo,
if (i + 2 > length)
return -1;
tlv = cp + i;
- type = (uint8_t)tlv[0];
- optlen = (uint8_t)tlv[1];
+ type = tlv[0];
+ optlen = tlv[1];
value = tlv + 2;
ND_PRINT((ndo, "\n"));
@@ -408,7 +408,7 @@ hncp_print_rec(netdissect_options *ndo,
uint32_t last_type_mask = 0xffffffffU;
int last_type_count = -1;
- const u_char *tlv, *value;
+ const uint8_t *tlv, *value;
uint16_t type, bodylen;
uint32_t type_mask;
@@ -728,7 +728,7 @@ hncp_print_rec(netdissect_options *ndo,
ND_PRINT((ndo, " %s", istr));
break;
}
- prty = (uint8_t)(value[4] & 0xf);
+ prty = value[4] & 0xf;
ND_PRINT((ndo, " EPID: %08x Prty: %u",
EXTRACT_32BITS(value),
prty