]> granicus.if.org Git - apache/commitdiff
C89 and such
authorDaniel Gruno <humbedooh@apache.org>
Wed, 23 Apr 2014 14:42:18 +0000 (14:42 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Wed, 23 Apr 2014 14:42:18 +0000 (14:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1589430 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index 9b1926df92804399afd5f12ed6fe9c912f775c2a..8beb70e46488754129274d4728d2b7c984d50916 100644 (file)
@@ -320,10 +320,11 @@ static int req_parseargs(lua_State *L)
 /* ap_lua_binstrstr: Binary strstr function for uploaded data with NULL bytes */
 static char* ap_lua_binstrstr (const char * haystack, size_t hsize, const char* needle, size_t nsize)
 {
+    size_t p;
     if (haystack == NULL) return NULL;
     if (needle == NULL) return NULL;
     if (hsize < nsize) return NULL;
-    for (size_t p = 0; p <= (hsize - nsize); ++p) {
+    for (p = 0; p <= (hsize - nsize); ++p) {
         if (memcmp(haystack + p, needle, nsize) == 0) {
             return (char*) (haystack + p);
         }