summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-08-20 17:44:35 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2008-08-20 17:46:54 +0200
commitbcb049a7027f4e22d9ebb0e84514f1eb86cad65e (patch)
tree1900f25fb4d055eaaa7c97b83f79b1851c942da4 /lib
parent7163d8fd2dfe656baf68f2a94d633073c979b45c (diff)
downloadbarebox-bcb049a7027f4e22d9ebb0e84514f1eb86cad65e.tar.gz
barebox-bcb049a7027f4e22d9ebb0e84514f1eb86cad65e.tar.xz
string: add typechecking for strchr, strrchr, strstr
These functions offered an excellent possibility to bypass compiler type checking. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/string.c b/lib/string.c
index c0716df526..520eb74f12 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -160,7 +160,7 @@ EXPORT_SYMBOL(strncmp);
* @s: The string to be searched
* @c: The character to search for
*/
-char * strchr(const char * s, int c)
+char * _strchr(const char * s, int c)
{
for(; *s != (char) c; ++s)
if (*s == '\0')
@@ -168,7 +168,7 @@ char * strchr(const char * s, int c)
return (char *) s;
}
#endif
-EXPORT_SYMBOL(strchr);
+EXPORT_SYMBOL(_strchr);
#ifndef __HAVE_ARCH_STRRCHR
/**
@@ -176,7 +176,7 @@ EXPORT_SYMBOL(strchr);
* @s: The string to be searched
* @c: The character to search for
*/
-char * strrchr(const char * s, int c)
+char * _strrchr(const char * s, int c)
{
const char *p = s + strlen(s);
do {
@@ -522,7 +522,7 @@ EXPORT_SYMBOL(memscan);
* @s1: The string to be searched
* @s2: The string to search for
*/
-char * strstr(const char * s1,const char * s2)
+char * _strstr(const char * s1,const char * s2)
{
int l1, l2;