You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2012/09/10 20:37:24 UTC

svn commit: r1383028 - in /httpd/httpd/trunk/modules/lua: lua_vmprep.c mod_lua.c

Author: sf
Date: Mon Sep 10 18:37:23 2012
New Revision: 1383028

URL: http://svn.apache.org/viewvc?rev=1383028&view=rev
Log:
more coding style (no logic change)

Modified:
    httpd/httpd/trunk/modules/lua/lua_vmprep.c
    httpd/httpd/trunk/modules/lua/mod_lua.c

Modified: httpd/httpd/trunk/modules/lua/lua_vmprep.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_vmprep.c?rev=1383028&r1=1383027&r2=1383028&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_vmprep.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_vmprep.c Mon Sep 10 18:37:23 2012
@@ -441,7 +441,7 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua
                         "creating lua_State with file %s", spec->file);
         /* not available, so create */
 
-        if(!vm_construct(&L, spec, lifecycle_pool)) {
+        if (!vm_construct(&L, spec, lifecycle_pool)) {
             AP_DEBUG_ASSERT(L != NULL);
             apr_pool_userdata_set(L, spec->file, cleanup_lua, lifecycle_pool);
         }

Modified: httpd/httpd/trunk/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=1383028&r1=1383027&r2=1383028&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/mod_lua.c (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.c Mon Sep 10 18:37:23 2012
@@ -230,7 +230,7 @@ static const char* ap_lua_interpolate_st
         ret = apr_pstrcat(pool, ret, stringBetween, NULL);
     }
     /* If no replacement was made, just return the original string */
-    else if (y==0) {
+    else if (y == 0) {
         return string;
     }
     return ret;
@@ -533,16 +533,15 @@ static apr_status_t lua_input_filter_han
             const char *data;
             apr_size_t len;
             
-            if(APR_BUCKET_IS_EOS(pbktIn)) {
+            if (APR_BUCKET_IS_EOS(pbktIn)) {
                 APR_BUCKET_REMOVE(pbktIn);
                 break;
             }
 
             /* read the bucket */
             ret = apr_bucket_read(pbktIn, &data, &len, eBlock);
-            if(ret != APR_SUCCESS) {
+            if (ret != APR_SUCCESS)
                 return ret;
-            }
 
             /* Push the bucket onto the Lua stack as a global var */
             lastCall++;
@@ -693,7 +692,7 @@ static int lua_map_handler(request_rec *
         }
         if (!ap_regexec(hook_spec->uri_pattern, r->uri, 10, match, 0)) {
             int i;
-            for (i=0;i<10;i++) {
+            for (i=0 ; i < 10; i++) {
                 if (match[i].rm_eo >= 0) {
                     values[i] = apr_pstrndup(r->pool, r->uri+match[i].rm_so, match[i].rm_eo - match[i].rm_so);
                 }
@@ -1880,11 +1879,11 @@ static void *merge_dir_config(apr_pool_t
     a->dir = apr_pstrdup(p, overrides->dir);
 
     a->vm_scope = (overrides->vm_scope == AP_LUA_SCOPE_UNSET) ? base->vm_scope: overrides->vm_scope;
-    a->inherit = (overrides->inherit== AP_LUA_INHERIT_UNSET) ? base->inherit : overrides->inherit;
-    a->codecache = (overrides->codecache== AP_LUA_CACHE_UNSET) ? base->codecache : overrides->codecache;
+    a->inherit = (overrides->inherit == AP_LUA_INHERIT_UNSET) ? base->inherit : overrides->inherit;
+    a->codecache = (overrides->codecache == AP_LUA_CACHE_UNSET) ? base->codecache : overrides->codecache;
     
-    a->vm_min = (overrides->vm_min== 0) ? base->vm_min : overrides->vm_min;
-    a->vm_max = (overrides->vm_max== 0) ? base->vm_max : overrides->vm_max;
+    a->vm_min = (overrides->vm_min == 0) ? base->vm_min : overrides->vm_min;
+    a->vm_max = (overrides->vm_max == 0) ? base->vm_max : overrides->vm_max;
 
     if (a->inherit == AP_LUA_INHERIT_UNSET || a->inherit == AP_LUA_INHERIT_PARENT_FIRST) { 
         a->package_paths = apr_array_append(p, base->package_paths, overrides->package_paths);