rfkill: fix compiler warning [-Wsign-compare]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-05-06 16:44:20 +02:00
parent 64a89adaa1
commit 787af7ce7c
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ static int rfkill_read_event(int fd, struct rfkill_event *event)
return -errno;
}
if (len < RFKILL_EVENT_SIZE_V1) {
if ((size_t) len < RFKILL_EVENT_SIZE_V1) {
warnx(_("wrong size of rfkill event: %zu < %zu"),
(size_t) len, RFKILL_EVENT_SIZE_V1);
return 1;