Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2017 02:53:01 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323895 - head/sys/boot/efi/libefi
Message-ID:  <201709220253.v8M2r1bZ089767@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Fri Sep 22 02:53:01 2017
New Revision: 323895
URL: https://svnweb.freebsd.org/changeset/base/323895

Log:
  libefi: efi_devpath_match local len should be unsigned
  
  DevicePathNodeLength() will always return unsigned value.

Modified:
  head/sys/boot/efi/libefi/devpath.c

Modified: head/sys/boot/efi/libefi/devpath.c
==============================================================================
--- head/sys/boot/efi/libefi/devpath.c	Fri Sep 22 02:36:36 2017	(r323894)
+++ head/sys/boot/efi/libefi/devpath.c	Fri Sep 22 02:53:01 2017	(r323895)
@@ -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_DEVIC
 		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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709220253.v8M2r1bZ089767>