From: André Malo Date: Thu, 31 Jul 2003 16:56:28 +0000 (+0000) Subject: gcc doesn't catch the logic and throws a warning about uninitialized X-Git-Tag: pre_ajp_proxy~1311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e52a2fbb27c406d5f524a08acddcfacb5db8b37f;p=apache gcc doesn't catch the logic and throws a warning about uninitialized fname. Get a rid of it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100877 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 9fc8b20b94..91c46e9637 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -2665,10 +2665,10 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1, } else if (strncasecmp(a2, "dbm", 3) == 0) { const char *ignored_fname; - int bad = 0; apr_status_t rv; newmap->type = MAPTYPE_DBM; + fname = NULL; if (a2[3] == ':') { newmap->dbmtype = "default"; @@ -2682,15 +2682,9 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1, colon - (a2 + 3) - 1); fname = colon + 1; } - else { - ++bad; - } - } - else { - ++bad; } - if (bad) { + if (!fname) { return apr_pstrcat(cmd->pool, "RewriteMap: bad map:", a2, NULL); }