From 7f6a84a6a9c74ffc676c90accacf9caee3dedfca Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Wed, 9 Apr 2008 12:40:14 +0000 Subject: [PATCH] No var declarations in the middle of the code. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646305 13f79535-47bb-0310-9956-ffa450edef68 --- modules/aaa/mod_auth_form.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/aaa/mod_auth_form.c b/modules/aaa/mod_auth_form.c index 9e7a06a472..cfc81cc066 100644 --- a/modules/aaa/mod_auth_form.c +++ b/modules/aaa/mod_auth_form.c @@ -563,6 +563,8 @@ static int get_form_auth(request_rec * r, apr_off_t len; apr_size_t size; apr_bucket_brigade *kept_body = NULL; + int res; + char *buffer; /* have we isolated the user and pw before? */ get_notes_auth(r, sent_user, sent_pw, sent_method, sent_mimetype); @@ -570,7 +572,7 @@ static int get_form_auth(request_rec * r, return OK; } - int res = ap_parse_request_form(r, &pairs, -1, conf->form_size); + res = ap_parse_request_form(r, &pairs, -1, conf->form_size); if (res != OK) { return res; } @@ -578,7 +580,7 @@ static int get_form_auth(request_rec * r, ap_form_pair_t *pair = (ap_form_pair_t *) apr_array_pop(pairs); if (username && !strcmp(pair->name, username) && sent_user) { apr_brigade_length(pair->value, 1, &len); - char *buffer = apr_palloc(r->pool, len + 1); + buffer = apr_palloc(r->pool, len + 1); size = (apr_size_t) len; apr_brigade_flatten(pair->value, buffer, &size); buffer[len] = 0; @@ -586,7 +588,7 @@ static int get_form_auth(request_rec * r, } else if (password && !strcmp(pair->name, password) && sent_pw) { apr_brigade_length(pair->value, 1, &len); - char *buffer = apr_palloc(r->pool, len + 1); + buffer = apr_palloc(r->pool, len + 1); size = (apr_size_t) len; apr_brigade_flatten(pair->value, buffer, &size); buffer[len] = 0; @@ -594,7 +596,7 @@ static int get_form_auth(request_rec * r, } else if (location && !strcmp(pair->name, location) && sent_loc) { apr_brigade_length(pair->value, 1, &len); - char *buffer = apr_palloc(r->pool, len + 1); + buffer = apr_palloc(r->pool, len + 1); size = (apr_size_t) len; apr_brigade_flatten(pair->value, buffer, &size); buffer[len] = 0; @@ -602,7 +604,7 @@ static int get_form_auth(request_rec * r, } else if (method && !strcmp(pair->name, method) && sent_method) { apr_brigade_length(pair->value, 1, &len); - char *buffer = apr_palloc(r->pool, len + 1); + buffer = apr_palloc(r->pool, len + 1); size = (apr_size_t) len; apr_brigade_flatten(pair->value, buffer, &size); buffer[len] = 0; @@ -610,7 +612,7 @@ static int get_form_auth(request_rec * r, } else if (mimetype && !strcmp(pair->name, mimetype) && sent_mimetype) { apr_brigade_length(pair->value, 1, &len); - char *buffer = apr_palloc(r->pool, len + 1); + buffer = apr_palloc(r->pool, len + 1); size = (apr_size_t) len; apr_brigade_flatten(pair->value, buffer, &size); buffer[len] = 0; -- 2.40.0