summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorespie <>2001-09-07 08:09:31 +0000
committerespie <>2001-09-07 08:09:31 +0000
commit4ec7a834f44dd7e54a2d9d774fd0a4c7563acee5 (patch)
tree61504568bb10009499a72ed8c65980687cf51769 /src
parent45a8dfe1d6eee7cc00a44036d857fd1cc76d2989 (diff)
downloadopenbsd-4ec7a834f44dd7e54a2d9d774fd0a4c7563acee5.tar.gz
openbsd-4ec7a834f44dd7e54a2d9d774fd0a4c7563acee5.tar.bz2
openbsd-4ec7a834f44dd7e54a2d9d774fd0a4c7563acee5.zip
K&R promotion is not the whole story. Make things explicit.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/string/memchr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/string/memchr.c b/src/lib/libc/string/memchr.c
index 8ae05bbef3..d605d4734f 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)
38static char *rcsid = "$OpenBSD: memchr.c,v 1.3 1999/11/14 20:28:24 espie Exp $"; 38static char *rcsid = "$OpenBSD: memchr.c,v 1.4 2001/09/07 08:09:31 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>
@@ -50,7 +50,7 @@ memchr(s, c, n)
50 const unsigned char *p = s; 50 const unsigned char *p = s;
51 51
52 do { 52 do {
53 if (*p++ == c) 53 if (*p++ == (unsigned char)c)
54 return ((void *)(p - 1)); 54 return ((void *)(p - 1));
55 } while (--n != 0); 55 } while (--n != 0);
56 } 56 }