diff options
author | Daniel Carl <danielcarl@gmx.de> | 2013-03-29 23:54:55 +0100 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2013-03-29 23:54:55 +0100 |
commit | d0c836132b5ceb49769b720e221dde2f866eaf36 (patch) | |
tree | 8f2f2f0f0f5825dbd91470287a3ca39b3ffe0a57 /src/util.c | |
parent | 4f1203f089a39db3bbd211cbfe8cbcb7482b4acc (diff) |
Moved variables to the top of function.
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -100,15 +100,15 @@ char **util_get_lines(const char *filename) char *util_strcasestr(const char *haystack, const char *needle) { + unsigned char c1, c2; + int i, j; 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]; + c1 = haystack[i + j]; + c2 = needle[j]; if (toupper(c1) != toupper(c2)) { goto next; } |