summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/com32/lib/strchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/com32/lib/strchr.c')
-rw-r--r--contrib/syslinux-4.02/com32/lib/strchr.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/com32/lib/strchr.c b/contrib/syslinux-4.02/com32/lib/strchr.c
new file mode 100644
index 0000000..cd3ec78
--- /dev/null
+++ b/contrib/syslinux-4.02/com32/lib/strchr.c
@@ -0,0 +1,16 @@
+/*
+ * strchr.c
+ */
+
+#include <string.h>
+
+char *strchr(const char *s, int c)
+{
+ while (*s != (char)c) {
+ if (!*s)
+ return NULL;
+ s++;
+ }
+
+ return (char *)s;
+}