From 695260a9500e8f7b6ee81410c5659cb88f7094e8 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 7 Sep 2001 08:09:31 +0000 Subject: K&R promotion is not the whole story. Make things explicit. --- lib/libc/string/memchr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/string/memchr.c') diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c index 8ae05bbef3d..d605d4734f2 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.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); } -- cgit v1.2.3-59-g8ed1b