- fixes from Tito

This commit is contained in:
Bernhard Reutner-Fischer 2008-06-18 08:32:25 +00:00
parent 619b87dfa5
commit 4954d47ab0

View File

@ -17,15 +17,12 @@ char* strrstr(const char *haystack, const char *needle)
{
char *r = NULL;
if (!needle[0])
return r;
while (1) {
do {
char *p = strstr(haystack, needle);
if (!p)
return r;
if (p)
r = p;
haystack = p + 1;
}
} while (*haystack++);
return r;
}
#ifdef __DO_STRRSTR_TEST