]> granicus.if.org Git - apache/commitdiff
Use the AP_INIT_TAKE23() macro to clean up a maintainer-mode warning,
authorJeff Trawick <trawick@apache.org>
Wed, 2 Aug 2000 02:30:23 +0000 (02:30 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 2 Aug 2000 02:30:23 +0000 (02:30 +0000)
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

index a311345ba6af3d580d18e76538037761eee72dbf..432307d54d2d87a4ba2c6df50a06e27d9fa7684f 100644 (file)
  *
  */
 
+#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}
 };