From: Christophe Jaillet Date: Fri, 17 Aug 2018 20:36:31 +0000 (+0000) Subject: Fix a cppcheck warning. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2388 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cb2f82a23ee4001f3136452dae8adb342162362;p=thirdparty%2Fapache%2Fhttpd.git Fix a cppcheck warning. Remove some dead code. '!r->content_languages' is known to be true at this point. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1838285 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 28c53be132b..03d1c4110b6 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -989,9 +989,7 @@ static int find_ct(request_rec *r) if (!r->content_languages && conf->default_language) { const char **new; - if (!r->content_languages) { - r->content_languages = apr_array_make(r->pool, 2, sizeof(char *)); - } + r->content_languages = apr_array_make(r->pool, 2, sizeof(char *)); new = (const char **)apr_array_push(r->content_languages); *new = conf->default_language; }