/*
* Utility routines.
*
- * Copyright (C) 2008 Bernhard Fischer
+ * Copyright (C) 2008 Bernhard Reutner-Fischer
*
- * Licensed under GPLv2 or later, see file License in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#ifdef __DO_STRRSTR_TEST
* The strrstr() function finds the last occurrence of the substring needle
* in the string haystack. The terminating nul characters are not compared.
*/
-char* strrstr(const char *haystack, const char *needle)
+char* FAST_FUNC strrstr(const char *haystack, const char *needle)
{
char *r = NULL;
if (!needle[0])
- return (char*)haystack;
+ return (char*)haystack + strlen(haystack);
while (1) {
char *p = strstr(haystack, needle);
if (!p)