libefi: efi_devpath_match local len should be unsigned

DevicePathNodeLength() will always return unsigned value.
This commit is contained in:
Toomas Soome 2017-09-22 02:53:01 +00:00
parent 78ed811e6c
commit cbc1b3de8f

View File

@ -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))