about summary refs log tree commit diff
path: root/third_party/git/compat/strcasestr.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/compat/strcasestr.c')
-rw-r--r--third_party/git/compat/strcasestr.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/third_party/git/compat/strcasestr.c b/third_party/git/compat/strcasestr.c
deleted file mode 100644
index 26896deca6..0000000000
--- a/third_party/git/compat/strcasestr.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "../git-compat-util.h"
-
-char *gitstrcasestr(const char *haystack, const char *needle)
-{
-	int nlen = strlen(needle);
-	int hlen = strlen(haystack) - nlen + 1;
-	int i;
-
-	for (i = 0; i < hlen; i++) {
-		int j;
-		for (j = 0; j < nlen; j++) {
-			unsigned char c1 = haystack[i+j];
-			unsigned char c2 = needle[j];
-			if (toupper(c1) != toupper(c2))
-				goto next;
-		}
-		return (char *) haystack + i;
-	next:
-		;
-	}
-	return NULL;
-}