summaryrefslogtreecommitdiff
path: root/lib/libc/string
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2013-08-28 15:24:41 +0000
committerriastradh <riastradh@NetBSD.org>2013-08-28 15:24:41 +0000
commitbb1d12db8a8adebb626f9db549d429a14a964832 (patch)
tree7985a24cf84b4efdae237d3e3124760f5a44547f /lib/libc/string
parenta454fa8ec73dcbe9f5d629a35f6eef562b14f41a (diff)
Fix sense of consttime_memequal and update all callers.
Now it returns true (nonzero) to mean equal and false (zero) to mean inequal, as the name suggests. As promised on tech-userlevel back in June: https://mail-index.netbsd.org/tech-userlevel/2013/06/24/msg007843.html
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/consttime_memequal.38
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/string/consttime_memequal.3 b/lib/libc/string/consttime_memequal.3
index 2f71503b777..bf2b9fe5326 100644
--- a/lib/libc/string/consttime_memequal.3
+++ b/lib/libc/string/consttime_memequal.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: consttime_memequal.3,v 1.1 2013/06/24 04:21:20 riastradh Exp $
+.\" $NetBSD: consttime_memequal.3,v 1.2 2013/08/28 15:24:41 riastradh Exp $
.\"
.\" Copyright (c) 2013 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 23, 2013
+.Dd August 28, 2013
.Dt CONSTTIME_MEMEQUAL 3
.Os
.Sh NAME
@@ -48,8 +48,8 @@ bytes of memory at
.Fa b1
and
.Fa b2
-for equality, returning zero if they are identical and nonzero
-otherwise.
+for equality, returning zero if they are distinct and nonzero if they
+are identical.
.Pp
The time taken by
.Fn consttime_memequal