From: Christophe Jaillet Date: Thu, 3 Mar 2016 20:57:59 +0000 (+0000) Subject: Use ap_array_str_contains to simplify code X-Git-Tag: 2.5.0-alpha~1962 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2972d5e61eba492f3ce293b58aa419245184c8a;p=apache Use ap_array_str_contains to simplify code git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1733523 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_authn_socache.c b/modules/aaa/mod_authn_socache.c index 98f2f7e588..b0f76e0cc3 100644 --- a/modules/aaa/mod_authn_socache.c +++ b/modules/aaa/mod_authn_socache.c @@ -297,21 +297,13 @@ static void ap_authn_cache_store(request_rec *r, const char *module, authn_cache_dircfg *dcfg; const char *key; apr_time_t expiry; - int i; - int use_cache = 0; /* first check whether we're cacheing for this module */ dcfg = ap_get_module_config(r->per_dir_config, &authn_socache_module); if (!configured || !dcfg->providers) { return; } - for (i = 0; i < dcfg->providers->nelts; ++i) { - if (!strcmp(module, APR_ARRAY_IDX(dcfg->providers, i, const char*))) { - use_cache = 1; - break; - } - } - if (!use_cache) { + if (!ap_array_str_contains(dcfg->providers, module)) { return; }