From cbc1b3de8fdee8fb7ca5e69c65149a754abb6b66 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 22 Sep 2017 02:53:01 +0000 Subject: [PATCH] libefi: efi_devpath_match local len should be unsigned DevicePathNodeLength() will always return unsigned value. --- sys/boot/efi/libefi/devpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/boot/efi/libefi/devpath.c b/sys/boot/efi/libefi/devpath.c index 934d9d0654b..15f2a5aab41 100644 --- a/sys/boot/efi/libefi/devpath.c +++ b/sys/boot/efi/libefi/devpath.c @@ -142,7 +142,7 @@ efi_devpath_handle(EFI_DEVICE_PATH *devpath) bool efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) { - int len; + size_t len; if (devpath1 == NULL || devpath2 == NULL) return (false); @@ -156,7 +156,7 @@ efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) if (len != DevicePathNodeLength(devpath2)) return (false); - if (memcmp(devpath1, devpath2, (size_t)len) != 0) + if (memcmp(devpath1, devpath2, len) != 0) return (false); if (IsDevicePathEnd(devpath1))