Also ensure that we use unsigned integers since we are reading unsigned
chars.
hardware->h_rx_unrecognized_cnt++;
#else
u_int32_t policy;
- int loctype;
- int power;
+ unsigned loctype;
+ unsigned power;
switch (tlv_subtype) {
case LLDP_TLV_MED_CAP:
port->p_med_power.devicetype =
LLDP_MED_POW_TYPE_RESERVED;
}
- if (((power & 0x0F) < 0) ||
- ((power & 0x0F) > LLDP_MED_POW_PRIO_LOW))
+ if ((power & 0x0F) > LLDP_MED_POW_PRIO_LOW)
port->p_med_power.priority =
LLDP_MED_POW_PRIO_UNKNOWN;
else