From a7206ca96293313bdf24aa8bbdff934a1d3b92e6 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 25 Jun 2010 19:27:24 +0000 Subject: [PATCH] C99 is not a requirement, fix style violation niq refuses(?) to correct. Ensures the two initialization stanzas follow the same pattern, which is goodness, IMHO. Reviewed by: trawick, wrowe Submitted by: Norm git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@958094 13f79535-47bb-0310-9956-ffa450edef68 --- modules/aaa/mod_authn_socache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/aaa/mod_authn_socache.c b/modules/aaa/mod_authn_socache.c index baf49f3bbd..88f2628c49 100644 --- a/modules/aaa/mod_authn_socache.c +++ b/modules/aaa/mod_authn_socache.c @@ -301,11 +301,12 @@ static authn_status check_password(request_rec *r, const char *user, * to no-longer-defined memory. Hmmm ... */ apr_status_t rv; + const char *key; unsigned char val[MAX_VAL_LEN]; unsigned int vallen = MAX_VAL_LEN - 1; authn_cache_dircfg *dcfg = ap_get_module_config(r->per_dir_config, &authn_socache_module); - const char *key = construct_key(r, dcfg->context, user, NULL); + key = construct_key(r, dcfg->context, user, NULL); rv = socache_provider->retrieve(socache_instance, r->server, (unsigned char*)key, strlen(key), val, &vallen, r->pool); @@ -342,11 +343,12 @@ static authn_status get_realm_hash(request_rec *r, const char *user, const char *realm, char **rethash) { apr_status_t rv; + const char *key; authn_cache_dircfg *dcfg; unsigned char val[MAX_VAL_LEN]; unsigned int vallen = MAX_VAL_LEN - 1; dcfg = ap_get_module_config(r->per_dir_config, &authn_socache_module); - const char *key = construct_key(r, dcfg->context, user, realm); + key = construct_key(r, dcfg->context, user, realm); rv = socache_provider->retrieve(socache_instance, r->server, (unsigned char*)key, strlen(key), val, &vallen, r->pool); -- 2.40.0