]> granicus.if.org Git - apache/commitdiff
Replace the strsep() call to the more portable apr_strtok() call so that we can build...
authorBradley Nicholes <bnicholes@apache.org>
Fri, 16 Jul 2004 16:12:22 +0000 (16:12 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Fri, 16 Jul 2004 16:12:22 +0000 (16:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104305 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index 074e3e5bcfb503f156ed51058304f1ad492d8ded..78eed887e4aa22e104cfde3b4be3f3f27cd3797e 100644 (file)
@@ -1232,19 +1232,17 @@ static const char *set_allow_opts(cmd_parms *cmd, allow_options_t *opts,
     allow_options_t opt;
     int first = 1;
 
-    char *p = (char *) l;
+    char *w, *p = (char *) l;
+    char *tok_state;
 
-    while (p && *p) {
-        char *w = strsep(&p, ",");
+    while (w = apr_strtok(p, ",", &tok_state)) {
 
         if (first) {
+            p = NULL;
             *opts = OPT_NONE;
             first = 0;
         }
 
-       if (!w)
-           continue;
-
         if (!strcasecmp(w, "Indexes")) {
             opt = OPT_INDEXES;
         }