diff options
author | anton <anton@openbsd.org> | 2019-01-20 09:47:31 +0000 |
---|---|---|
committer | anton <anton@openbsd.org> | 2019-01-20 09:47:31 +0000 |
commit | 93fbf3f2d032c98f0324312b1a01f7d8a05431d2 (patch) | |
tree | 35984019d0dd89478fe8acefd124c8e87172977d /sys/dev/kcov.c | |
parent | Provide a way to get just the record header. (diff) | |
download | wireguard-openbsd-93fbf3f2d032c98f0324312b1a01f7d8a05431d2.tar.xz wireguard-openbsd-93fbf3f2d032c98f0324312b1a01f7d8a05431d2.zip |
Rework conditional for clarity, no functional change.
ok bluhm@ visa@ (as part of a larger diff)
Diffstat (limited to 'sys/dev/kcov.c')
-rw-r--r-- | sys/dev/kcov.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/kcov.c b/sys/dev/kcov.c index 1d002bc0bcd..32105910012 100644 --- a/sys/dev/kcov.c +++ b/sys/dev/kcov.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kcov.c,v 1.11 2019/01/19 17:23:32 anton Exp $ */ +/* $OpenBSD: kcov.c,v 1.12 2019/01/20 09:47:31 anton Exp $ */ /* * Copyright (c) 2018 Anton Lindqvist <anton@openbsd.org> @@ -99,7 +99,7 @@ __sanitizer_cov_trace_pc(void) return; idx = kd->kd_buf[0]; - if (idx < kd->kd_nmemb) { + if (idx + 1 <= kd->kd_nmemb) { kd->kd_buf[idx + 1] = (uintptr_t)__builtin_return_address(0); kd->kd_buf[0] = idx + 1; } |