From 3ae78ff3833de9187e9fc0eb6aab69a8b8162c5a Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 2 Aug 2000 02:30:23 +0000 Subject: [PATCH] Use the AP_INIT_TAKE23() macro to clean up a maintainer-mode warning, then fix the warnings resulting from AP_INIT_TAKE23() :) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85975 13f79535-47bb-0310-9956-ffa450edef68 --- modules/metadata/mod_headers.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index a311345ba6..432307d54d 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -102,6 +102,7 @@ * */ +#include "apr_strings.h" #include "httpd.h" #include "http_config.h" #include "http_request.h" @@ -116,7 +117,7 @@ typedef enum { typedef struct { hdr_actions action; char *header; - char *value; + const char *value; } header_entry; /* @@ -155,8 +156,11 @@ static void *merge_headers_config(ap_pool_t *p, void *basev, void *overridesv) } -static const char *header_cmd(cmd_parms *cmd, headers_conf * dirconf, char *action, char *hdr, char *value) +static const char *header_cmd(cmd_parms *cmd, void *indirconf, + const char *action, const char *inhdr, const char *value) { + headers_conf *dirconf = indirconf; + char *hdr = ap_pstrdup(cmd->pool, inhdr); header_entry *new; server_rec *s = cmd->server; headers_conf *serverconf = @@ -199,8 +203,8 @@ static const char *header_cmd(cmd_parms *cmd, headers_conf * dirconf, char *acti static const command_rec headers_cmds[] = { - {"Header", header_cmd, NULL, OR_FILEINFO, TAKE23, - "an action, header and value"}, + AP_INIT_TAKE23("Header", header_cmd, NULL, OR_FILEINFO, + "an action, header and value"), {NULL} }; -- 2.50.1