From 5eddb6d978936e5cd48b8ba1fc3970ee322604bd Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Mon, 10 Sep 2012 18:37:23 +0000 Subject: [PATCH] more coding style (no logic change) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383028 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_vmprep.c | 2 +- modules/lua/mod_lua.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/lua/lua_vmprep.c b/modules/lua/lua_vmprep.c index 21591bdc5f..05fc5e1561 100644 --- a/modules/lua/lua_vmprep.c +++ b/modules/lua/lua_vmprep.c @@ -441,7 +441,7 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool, "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); } diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index 59ce62c497..7f7bc457e9 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -230,7 +230,7 @@ static const char* ap_lua_interpolate_string(apr_pool_t* pool, const char* strin 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_handle(ap_filter_t *f, 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 *r) } 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 *p, void *basev, void *overridesv) 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); -- 2.50.0