fix signed/unsigned comparison warning

master
Andre Puschmann 5 years ago
parent 4e2d9c6b60
commit 47019e26f6

@ -137,7 +137,7 @@ public:
nof_subheaders++;
}
if (ret && (ptr - init_ptr) >= pdu_len) {
if (ret && ((ptr - init_ptr) >= (int32_t)pdu_len)) {
// stop processing last subheader indicates another one but all bytes are consume
nof_subheaders = 0;
INFO("Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len);
@ -145,7 +145,7 @@ public:
log->info_hex(init_ptr, pdu_len, "Corrupted MAC PDU - all bytes have been consumed (pdu_len=%d)\n", pdu_len);
}
}
} while (ret && (nof_subheaders + 1) < (int)max_subheaders && pdu_len > (ptr - init_ptr));
} while (ret && (nof_subheaders + 1) < (int)max_subheaders && ((int32_t)pdu_len > (ptr - init_ptr)));
for (int i = 0; i < nof_subheaders; i++) {
subheaders[i].read_payload(&ptr);

Loading…
Cancel
Save