diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-09-07 08:09:32 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-09-07 08:09:32 +0000 |
commit | 1420b68f760039da36d3003b7fbecae6a557bdab (patch) | |
tree | 6ea6a24ea6b60cc8768297c8424bbe9c324e9204 /lib/libc/string | |
parent | 4c516b9028ec072ca31f4db999191171864c6a6d (diff) |
K&R promotion is not the whole story. Make things explicit.
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/memchr.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <string.h> @@ -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); } |