From 0f70e36e8257f708ff8509cef09c5c2aadb65dfa Mon Sep 17 00:00:00 2001 From: JustinAJ Date: Tue, 3 Jun 2014 21:00:12 -0400 Subject: [PATCH] Removed a useless variable and changed index types from int to size_t. I'll probably rewrite this later. --- Jupiter/Functions.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Jupiter/Functions.c b/Jupiter/Functions.c index f8b4588..b8d7226 100644 --- a/Jupiter/Functions.c +++ b/Jupiter/Functions.c @@ -159,9 +159,8 @@ size_t Jupiter_vstrlen(const void *str, size_t size) const char *stristr(const char *str1, const char *str2) { - const char *strr; - int i; - int a; + size_t i; + size_t a; for (i = 0; str1[i] != 0; i++) { if (toupper(str1[i]) == toupper(str2[0])) @@ -174,8 +173,7 @@ const char *stristr(const char *str1, const char *str2) } if (str2[a] == 0) { - strr = &str1[i]; - return strr; + return str1 + i; } } }