]> granicus.if.org Git - apache/commitdiff
Fix warnings.
authorBen Laurie <ben@apache.org>
Tue, 20 Jun 2000 20:52:44 +0000 (20:52 +0000)
committerBen Laurie <ben@apache.org>
Tue, 20 Jun 2000 20:52:44 +0000 (20:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85643 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_imap.c
modules/mappers/mod_userdir.c

index c803ceb193bb3647fd9c4a7343a57b262ec23b4a..f32ccbb8e8f6a1b1e1e8f891db386f2cd4489469 100644 (file)
@@ -288,14 +288,14 @@ static double get_x_coord(const char *args)
 static double get_y_coord(const char *args)
 {
     char *endptr;               /* we want it non-null */
-    char *start_of_y = NULL;
+    const char *start_of_y = NULL;
     double y_coord = -1;        /* -1 is returned on error */
 
     if (args == NULL) {
         return (-1);            /* in case we aren't passed anything */
     }
 
-    start_of_y = strchr(args, ',');     /* the comma */
+    start_of_y = ap_strchr_c(args, ',');     /* the comma */
 
     if (start_of_y) {
 
@@ -411,7 +411,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value)
     }
 
     /* must be a relative URL to be combined with base */
-    if (strchr(base, '/') == NULL && (!strncmp(value, "../", 3)
+    if (ap_strchr_c(base, '/') == NULL && (!strncmp(value, "../", 3)
         || !strcmp(value, ".."))) {
         ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
                     "invalid base directive in map file: %s", r->uri);
index 911d9e8b2c409b1650f9b6875a8c09a5d11b45cd..7e83bb1fb380c6b1e9d2a4c7a9882ea018361b91 100644 (file)
@@ -135,7 +135,7 @@ static void *create_userdir_config(ap_pool_t *p, server_rec *s)
 #define O_ENABLE 1
 #define O_DISABLE 2
 
-static const char *set_user_dir(cmd_parms *cmd, void *dummy, char *arg)
+static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
 {
     userdir_config
     * s_cfg = (userdir_config *) ap_get_module_config
@@ -270,7 +270,7 @@ static int translate_userdir(request_rec *r)
         const char *userdir = ap_getword_conf(r->pool, &userdirs);
         char *filename = NULL;
 
-        if (strchr(userdir, '*'))
+        if (ap_strchr_c(userdir, '*'))
             x = ap_getword(r->pool, &userdir, '*');
 
        if (userdir[0] == '\0' || ap_os_is_path_absolute(userdir)) {
@@ -297,7 +297,7 @@ static int translate_userdir(request_rec *r)
             else
                 filename = ap_pstrcat(r->pool, userdir, "/", w, NULL);
         }
-        else if (strchr(userdir, ':')) {
+        else if (ap_strchr_c(userdir, ':')) {
             redirect = ap_pstrcat(r->pool, userdir, "/", w, dname, NULL);
             ap_table_setn(r->headers_out, "Location", redirect);
             return REDIRECT;