Skip to content

Commit

Permalink
Use uctags implementation of strstr()
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Oct 8, 2016
1 parent 3219d97 commit d5b60d2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ctags/main/routines.c
Expand Up @@ -239,13 +239,12 @@ extern void eFree (void *const ptr)
extern char* strstr (const char *str, const char *substr)
{
const size_t length = strlen (substr);
const char *match = NULL;
const char *p;

for (p = str ; *p != '\0' && match == NULL ; ++p)
for (p = str ; *p != '\0' ; ++p)
if (strncmp (p, substr, length) == 0)
match = p;
return (char*) match;
return (char*) p;
return NULL;
}
#endif

Expand Down

0 comments on commit d5b60d2

Please sign in to comment.