summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/strchr.c')
-rw-r--r--lib/libc/string/strchr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/string/strchr.c b/lib/libc/string/strchr.c
index b396b45b3b0..8bfa7ac3aa0 100644
--- a/lib/libc/string/strchr.c
+++ b/lib/libc/string/strchr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strchr.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
+/* $OpenBSD: strchr.c,v 1.4 2018/10/01 06:37:37 martijn Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -36,7 +36,7 @@ char *
strchr(const char *p, int ch)
{
for (;; ++p) {
- if (*p == ch)
+ if (*p == (char) ch)
return((char *)p);
if (!*p)
return((char *)NULL);