mirror of
https://github.com/sheumann/hush.git
synced 2025-02-01 10:31:41 +00:00
- fixes from Tito
This commit is contained in:
parent
619b87dfa5
commit
4954d47ab0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user