summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/memchr.c
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>1999-11-14 20:28:24 +0000
committerespie <espie@openbsd.org>1999-11-14 20:28:24 +0000
commitcc56845458ac183fe7429e77914da80966ceed6b (patch)
tree1652cf7e75f12dfcbbcb0df62b1475ed9a1e91a1 /lib/libc/string/memchr.c
parenttypo (diff)
downloadwireguard-openbsd-cc56845458ac183fe7429e77914da80966ceed6b.tar.xz
wireguard-openbsd-cc56845458ac183fe7429e77914da80966ceed6b.zip
Clean up memchr slightly to better match coming memrchr
(K&R-style type promotions are evil),
Diffstat (limited to 'lib/libc/string/memchr.c')
-rw-r--r--lib/libc/string/memchr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c
index 2ebb5dab322..8ae05bbef3d 100644
--- a/lib/libc/string/memchr.c
+++ b/lib/libc/string/memchr.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: memchr.c,v 1.2 1996/08/19 08:34:04 tholo Exp $";
+static char *rcsid = "$OpenBSD: memchr.c,v 1.3 1999/11/14 20:28:24 espie Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -43,11 +43,11 @@ static char *rcsid = "$OpenBSD: memchr.c,v 1.2 1996/08/19 08:34:04 tholo Exp $";
void *
memchr(s, c, n)
const void *s;
- register unsigned char c;
- register size_t n;
+ int c;
+ size_t n;
{
if (n != 0) {
- register const unsigned char *p = s;
+ const unsigned char *p = s;
do {
if (*p++ == c)