diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-07-29 19:38:02 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-07-29 19:38:02 +0000 |
commit | d5a25a8d01789fab0f250e27f9c896b1ad9a9718 (patch) | |
tree | 07401eeec1079d60357bd1868d2fd6e6bea92f09 /sys/arch/armv7/stand | |
parent | 97808a59c41d30e3060040ddbd011671e71c886b (diff) |
Fix off-by-one in return value of efi_device_path_depth().
ok patrick@
Diffstat (limited to 'sys/arch/armv7/stand')
-rw-r--r-- | sys/arch/armv7/stand/efiboot/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/armv7/stand/efiboot/efiboot.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/armv7/stand/efiboot/conf.c b/sys/arch/armv7/stand/efiboot/conf.c index 7cac47de852..293f6dc43c7 100644 --- a/sys/arch/armv7/stand/efiboot/conf.c +++ b/sys/arch/armv7/stand/efiboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.7 2017/07/24 11:15:34 patrick Exp $ */ +/* $OpenBSD: conf.c,v 1.8 2017/07/29 19:38:01 kettenis Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -35,7 +35,7 @@ #include "efiboot.h" #include "efidev.h" -const char version[] = "0.6"; +const char version[] = "0.7"; int debug = 0; struct fs_ops file_system[] = { diff --git a/sys/arch/armv7/stand/efiboot/efiboot.c b/sys/arch/armv7/stand/efiboot/efiboot.c index f28c8749cb9..c0647d2c82d 100644 --- a/sys/arch/armv7/stand/efiboot/efiboot.c +++ b/sys/arch/armv7/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.15 2017/07/24 11:15:34 patrick Exp $ */ +/* $OpenBSD: efiboot.c,v 1.16 2017/07/29 19:38:01 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -218,7 +218,7 @@ efi_device_path_depth(EFI_DEVICE_PATH *dp, int dptype) for (i = 0; !IsDevicePathEnd(dp); dp = NextDevicePathNode(dp), i++) { if (DevicePathType(dp) == dptype) - return (i); + return (i + 1); } return (-1); |