diff options
author | espie <> | 1999-11-14 20:28:24 +0000 |
---|---|---|
committer | espie <> | 1999-11-14 20:28:24 +0000 |
commit | 4fe309cce629aa9cb11832d11adc06153db1805a (patch) | |
tree | 729643679b7eaf57ede834e21fd414fb3c439b5d | |
parent | 93d6d1325dc1d298c8a7d51a132a8e99c8d43b52 (diff) | |
download | openbsd-4fe309cce629aa9cb11832d11adc06153db1805a.tar.gz openbsd-4fe309cce629aa9cb11832d11adc06153db1805a.tar.bz2 openbsd-4fe309cce629aa9cb11832d11adc06153db1805a.zip |
Clean up memchr slightly to better match coming memrchr
(K&R-style type promotions are evil),
-rw-r--r-- | src/lib/libc/string/memchr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libc/string/memchr.c b/src/lib/libc/string/memchr.c index 2ebb5dab32..8ae05bbef3 100644 --- a/src/lib/libc/string/memchr.c +++ b/src/lib/libc/string/memchr.c | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #if defined(LIBC_SCCS) && !defined(lint) | 37 | #if defined(LIBC_SCCS) && !defined(lint) |
38 | static char *rcsid = "$OpenBSD: memchr.c,v 1.2 1996/08/19 08:34:04 tholo Exp $"; | 38 | static char *rcsid = "$OpenBSD: memchr.c,v 1.3 1999/11/14 20:28:24 espie Exp $"; |
39 | #endif /* LIBC_SCCS and not lint */ | 39 | #endif /* LIBC_SCCS and not lint */ |
40 | 40 | ||
41 | #include <string.h> | 41 | #include <string.h> |
@@ -43,11 +43,11 @@ static char *rcsid = "$OpenBSD: memchr.c,v 1.2 1996/08/19 08:34:04 tholo Exp $"; | |||
43 | void * | 43 | void * |
44 | memchr(s, c, n) | 44 | memchr(s, c, n) |
45 | const void *s; | 45 | const void *s; |
46 | register unsigned char c; | 46 | int c; |
47 | register size_t n; | 47 | size_t n; |
48 | { | 48 | { |
49 | if (n != 0) { | 49 | if (n != 0) { |
50 | register const unsigned char *p = s; | 50 | const unsigned char *p = s; |
51 | 51 | ||
52 | do { | 52 | do { |
53 | if (*p++ == c) | 53 | if (*p++ == c) |