From aecf1306d99968a2365737e39480a3b90bb4095c Mon Sep 17 00:00:00 2001 From: espie <> Date: Fri, 7 Sep 2001 08:09:31 +0000 Subject: [PATCH] K&R promotion is not the whole story. Make things explicit. --- src/lib/libc/string/memchr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libc/string/memchr.c b/src/lib/libc/string/memchr.c index 8ae05bbe..d605d473 100644 --- a/src/lib/libc/string/memchr.c +++ b/src/lib/libc/string/memchr.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: memchr.c,v 1.3 1999/11/14 20:28:24 espie Exp $"; +static char *rcsid = "$OpenBSD: memchr.c,v 1.4 2001/09/07 08:09:31 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -50,7 +50,7 @@ memchr(s, c, n) const unsigned char *p = s; do { - if (*p++ == c) + if (*p++ == (unsigned char)c) return ((void *)(p - 1)); } while (--n != 0); }