You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2014/04/23 16:42:19 UTC

svn commit: r1589430 - /httpd/httpd/branches/2.4.x/modules/lua/lua_request.c

Author: humbedooh
Date: Wed Apr 23 14:42:18 2014
New Revision: 1589430

URL: http://svn.apache.org/r1589430
Log:
C89 and such

Modified:
    httpd/httpd/branches/2.4.x/modules/lua/lua_request.c

Modified: httpd/httpd/branches/2.4.x/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/lua_request.c?rev=1589430&r1=1589429&r2=1589430&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/lua_request.c (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/lua_request.c Wed Apr 23 14:42:18 2014
@@ -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);
         }