diff options
author | 2004-11-28 07:23:41 +0000 | |
---|---|---|
committer | 2004-11-28 07:23:41 +0000 | |
commit | f6a3c9b1fa71b1a71957242d0da17e5e1f46240e (patch) | |
tree | 923ecdd7af5dbaae56d4af536e50c2c9c2c46dba /sys/lib/libkern/strncmp.c | |
parent | a tiny hppa64 bit (diff) | |
download | wireguard-openbsd-f6a3c9b1fa71b1a71957242d0da17e5e1f46240e.tar.xz wireguard-openbsd-f6a3c9b1fa71b1a71957242d0da17e5e1f46240e.zip |
sync from libc
Diffstat (limited to 'sys/lib/libkern/strncmp.c')
-rw-r--r-- | sys/lib/libkern/strncmp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/lib/libkern/strncmp.c b/sys/lib/libkern/strncmp.c index 78462928dfd..4101edf8bab 100644 --- a/sys/lib/libkern/strncmp.c +++ b/sys/lib/libkern/strncmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strncmp.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $ */ +/* $OpenBSD: strncmp.c,v 1.9 2004/11/28 07:23:41 mickey Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -30,11 +30,9 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -/*static char *sccsid = "from: @(#)strncmp.c 5.6 (Berkeley) 1/26/91";*/ -static char *rcsid = "$OpenBSD: strncmp.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $"; +static char *rcsid = "$OpenBSD: strncmp.c,v 1.9 2004/11/28 07:23:41 mickey Exp $"; #endif /* LIBC_SCCS and not lint */ -#include <sys/types.h> #if !defined(_KERNEL) && !defined(_STANDALONE) #include <string.h> #else @@ -49,7 +47,7 @@ strncmp(const char *s1, const char *s2, size_t n) return (0); do { if (*s1 != *s2++) - return (*(const u_char *)s1 - *(const u_char *)--s2); + return (*(unsigned char *)s1 - *(unsigned char *)--s2); if (*s1++ == 0) break; } while (--n != 0); |