drivers/at86rf2xx: Fix -Wsign-compare warning, add missing parentheses

This commit is contained in:
Joakim Nohlgård 2017-01-13 08:58:30 +01:00
parent 45c8bc47e8
commit a08a70a3fa
2 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ void at86rf2xx_reset(at86rf2xx_t *dev)
cpuid_get(cpuid);
#if CPUID_LEN > IEEE802154_LONG_ADDRESS_LEN
for (int i = IEEE802154_LONG_ADDRESS_LEN; i < CPUID_LEN; i++) {
for (unsigned int i = IEEE802154_LONG_ADDRESS_LEN; i < CPUID_LEN; i++) {
cpuid[i & 0x07] ^= cpuid[i];
}
#endif

View File

@ -434,8 +434,8 @@ static int _set(netdev2_t *netdev, netopt_t opt, void *val, size_t len)
}
else {
uint8_t chan = ((uint8_t *)val)[0];
if (chan < AT86RF2XX_MIN_CHANNEL ||
chan > AT86RF2XX_MAX_CHANNEL) {
if ((chan < AT86RF2XX_MIN_CHANNEL) ||
(chan > AT86RF2XX_MAX_CHANNEL)) {
res = -EINVAL;
break;
}