1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

more coding style (no logic change)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383028 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2012-09-10 18:37:23 +00:00
parent 7f15aa7251
commit 5eddb6d978
2 changed files with 9 additions and 10 deletions

View File

@@ -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); "creating lua_State with file %s", spec->file);
/* not available, so create */ /* not available, so create */
if(!vm_construct(&L, spec, lifecycle_pool)) { if (!vm_construct(&L, spec, lifecycle_pool)) {
AP_DEBUG_ASSERT(L != NULL); AP_DEBUG_ASSERT(L != NULL);
apr_pool_userdata_set(L, spec->file, cleanup_lua, lifecycle_pool); apr_pool_userdata_set(L, spec->file, cleanup_lua, lifecycle_pool);
} }

View File

@@ -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); ret = apr_pstrcat(pool, ret, stringBetween, NULL);
} }
/* If no replacement was made, just return the original string */ /* If no replacement was made, just return the original string */
else if (y==0) { else if (y == 0) {
return string; return string;
} }
return ret; return ret;
@@ -533,16 +533,15 @@ static apr_status_t lua_input_filter_handle(ap_filter_t *f,
const char *data; const char *data;
apr_size_t len; apr_size_t len;
if(APR_BUCKET_IS_EOS(pbktIn)) { if (APR_BUCKET_IS_EOS(pbktIn)) {
APR_BUCKET_REMOVE(pbktIn); APR_BUCKET_REMOVE(pbktIn);
break; break;
} }
/* read the bucket */ /* read the bucket */
ret = apr_bucket_read(pbktIn, &data, &len, eBlock); ret = apr_bucket_read(pbktIn, &data, &len, eBlock);
if(ret != APR_SUCCESS) { if (ret != APR_SUCCESS)
return ret; return ret;
}
/* Push the bucket onto the Lua stack as a global var */ /* Push the bucket onto the Lua stack as a global var */
lastCall++; 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)) { if (!ap_regexec(hook_spec->uri_pattern, r->uri, 10, match, 0)) {
int i; int i;
for (i=0;i<10;i++) { for (i=0 ; i < 10; i++) {
if (match[i].rm_eo >= 0) { 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); 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->dir = apr_pstrdup(p, overrides->dir);
a->vm_scope = (overrides->vm_scope == AP_LUA_SCOPE_UNSET) ? base->vm_scope: overrides->vm_scope; 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->inherit = (overrides->inherit == AP_LUA_INHERIT_UNSET) ? base->inherit : overrides->inherit;
a->codecache = (overrides->codecache== AP_LUA_CACHE_UNSET) ? base->codecache : overrides->codecache; 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_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_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) { 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); a->package_paths = apr_array_append(p, base->package_paths, overrides->package_paths);