]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
rfkill: fix compiler warning [-Wsign-compare]
authorKarel Zak <kzak@redhat.com>
Thu, 6 May 2021 14:44:20 +0000 (16:44 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 6 May 2021 14:44:20 +0000 (16:44 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/rfkill.c

index 0b72fa96384ba29a9e82b00bff50acf62bf222c4..745456e33f8648c1f84e04a8d2773e7e39065664 100644 (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;