httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1719254 - /httpd/httpd/trunk/server/core.c
Date Fri, 11 Dec 2015 04:30:09 GMT
Author: jailletc36
Date: Fri Dec 11 04:30:09 2015
New Revision: 1719254

URL: http://svn.apache.org/viewvc?rev=1719254&view=rev
Log:
Use 'ap_array_str_contains' to simplify code.

Modified:
    httpd/httpd/trunk/server/core.c

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1719254&r1=1719253&r2=1719254&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Fri Dec 11 04:30:09 2015
@@ -2679,17 +2679,7 @@ static const char *start_ifmod(cmd_parms
 
 AP_DECLARE(int) ap_exists_config_define(const char *name)
 {
-    char **defines;
-    int i;
-
-    defines = (char **)ap_server_config_defines->elts;
-    for (i = 0; i < ap_server_config_defines->nelts; i++) {
-        if (strcmp(defines[i], name) == 0) {
-            return 1;
-        }
-    }
-
-    return 0;
+    return ap_array_str_contains(ap_server_config_defines, name);
 }
 
 static const char *start_ifdefine(cmd_parms *cmd, void *dummy, const char *arg)



Mime
View raw message