From 2b5cf4ec3c7cb3689f272ebd069c744295e12e3d Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Tue, 20 Jun 2000 20:47:01 +0000 Subject: [PATCH] Convert module and fix warnings. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85642 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_cgi.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 6df34af2f2..4a6279ca2d 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -105,7 +105,7 @@ static int is_scriptaliased(request_rec *r) #define DEFAULT_BUFBYTES 1024 typedef struct { - char *logname; + const char *logname; long logbytes; int bufbytes; } cgi_server_conf; @@ -129,7 +129,7 @@ static void *merge_cgi_config(ap_pool_t *p, void *basev, void *overridesv) return overrides->logname ? overrides : base; } -static const char *set_scriptlog(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgi_server_conf *conf = @@ -139,7 +139,8 @@ static const char *set_scriptlog(cmd_parms *cmd, void *dummy, char *arg) return NULL; } -static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, + const char *arg) { server_rec *s = cmd->server; cgi_server_conf *conf = @@ -149,7 +150,8 @@ static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, char *arg) return NULL; } -static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, + const char *arg) { server_rec *s = cmd->server; cgi_server_conf *conf = @@ -161,12 +163,12 @@ static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, char *arg) static const command_rec cgi_cmds[] = { - {"ScriptLog", set_scriptlog, NULL, RSRC_CONF, TAKE1, - "the name of a log for script debugging info"}, - {"ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, TAKE1, - "the maximum length (in bytes) of the script debug log"}, - {"ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, TAKE1, - "the maximum size (in bytes) to record of a POST request"}, +AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF, + "the name of a log for script debugging info"), +AP_INIT_TAKE1("ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, + "the maximum length (in bytes) of the script debug log"), +AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, + "the maximum size (in bytes) to record of a POST request"), {NULL} }; @@ -407,7 +409,7 @@ static ap_status_t build_argv_list(char ***argv, request_rec *r, ap_pool_t *p) char *w; const char *args = r->args; - if (!args || !args[0] || strchr(args, '=')) { + if (!args || !args[0] || ap_strchr_c(args, '=')) { numwords = 1; } else { -- 2.40.0