diff options
author | anton <anton@cvs.openbsd.org> | 2019-01-20 09:47:32 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2019-01-20 09:47:32 +0000 |
commit | d158f01c0829fd28fdb02e8086b08ae7b68400ca (patch) | |
tree | cddec45de6c3eb6d671cdfc708b93ae98ced3844 | |
parent | 0ada793239c83738fe19255a6de50a9bcb123f25 (diff) |
Rework conditional for clarity, no functional change.
ok bluhm@ visa@ (as part of a larger diff)
-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; } |