]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Gonzalo Arana <gonzalo.arana@gmail.com>
authoramosjeffries <>
Thu, 17 Jan 2008 05:12:45 +0000 (05:12 +0000)
committeramosjeffries <>
Thu, 17 Jan 2008 05:12:45 +0000 (05:12 +0000)
Bug #2180 (update) - include minor issues

Use strtok_r() instead of hacking around strtok() problems.

src/cache_cf.cc

index c0c626bab4428f44af21abc34188316810c83fe7..d9dbe60493a2f6ddc263fc1e0e3b6039b122d4cf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.534 2008/01/14 13:19:48 hno Exp $
+ * $Id: cache_cf.cc,v 1.535 2008/01/16 22:12:45 amosjeffries Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -209,12 +209,11 @@ static int
 parseManyConfigFiles(char* files, int depth)
 {
     int error_count = 0;
-    char* tmp = files;
-    char* file = strtok(tmp, w_space);
+    char* saveptr = NULL;
+    char* file = strtok_r(tmp, w_space, &saveptr);
     while (file != NULL) {
-        tmp += strlen(file) +1;
         error_count += parseOneConfigFile(file, depth);
-        file = strtok(tmp, w_space);
+        file = strtok_r(tmp, w_space, &saveptr);
     }
     return error_count;
 }