[geany/geany] d5b60d: Use uctags implementation of strstr()

Jiří Techet git-noreply at xxxxx
Mon Dec 17 21:05:33 UTC 2018


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Sat, 08 Oct 2016 12:12:45 UTC
Commit:      d5b60d2f21560d0dd0479ff32090cd6865c49a3f
             https://github.com/geany/geany/commit/d5b60d2f21560d0dd0479ff32090cd6865c49a3f

Log Message:
-----------
Use uctags implementation of strstr()


Modified Paths:
--------------
    ctags/main/routines.c

Modified: ctags/main/routines.c
7 lines changed, 3 insertions(+), 4 deletions(-)
===================================================================
@@ -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
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list