diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-07-29 19:52:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-07-29 19:52:30 +0000 |
commit | 62d0579ed85009010615ebf0115796b419203ea5 (patch) | |
tree | f3050f3ed95899716212251af2599cee547eb9a1 /sys/arch/arm64/stand/efiboot | |
parent | d5a25a8d01789fab0f250e27f9c896b1ad9a9718 (diff) |
Fix off-by-one in return value of efi_device_path_depth().
ok patrick@
Diffstat (limited to 'sys/arch/arm64/stand/efiboot')
-rw-r--r-- | sys/arch/arm64/stand/efiboot/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/arm64/stand/efiboot/efiboot.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/arm64/stand/efiboot/conf.c b/sys/arch/arm64/stand/efiboot/conf.c index 74b3bc1614b..4f9e6028a52 100644 --- a/sys/arch/arm64/stand/efiboot/conf.c +++ b/sys/arch/arm64/stand/efiboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.4 2017/07/24 12:12:09 patrick Exp $ */ +/* $OpenBSD: conf.c,v 1.5 2017/07/29 19:51:50 kettenis Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -35,7 +35,7 @@ #include "efiboot.h" #include "efidev.h" -const char version[] = "0.4"; +const char version[] = "0.5"; int debug = 0; struct fs_ops file_system[] = { diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c index 25c963da222..faf9f382a4f 100644 --- a/sys/arch/arm64/stand/efiboot/efiboot.c +++ b/sys/arch/arm64/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.8 2017/07/24 12:12:09 patrick Exp $ */ +/* $OpenBSD: efiboot.c,v 1.9 2017/07/29 19:51:50 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -224,7 +224,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); |