]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Minor cleanup of parse_eol to get rid of leading whitespace
authorhno <>
Tue, 30 Jan 2001 16:46:46 +0000 (16:46 +0000)
committerhno <>
Tue, 30 Jan 2001 16:46:46 +0000 (16:46 +0000)
src/cache_cf.cc

index c813e7f7c4b678eb9094f628352ae749e69aab7d..0eef05ef4231da1097465b470f502bdb26abbe2a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.372 2001/01/28 00:45:45 hno Exp $
+ * $Id: cache_cf.cc,v 1.373 2001/01/30 09:46:46 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -1699,9 +1699,13 @@ free_string(char **var)
 void
 parse_eol(char *volatile *var)
 {
-    char *token = strtok(NULL, null_string);
+    unsigned char *token = strtok(NULL, null_string);
     safe_free(*var);
     if (token == NULL)
+       self_destruct();
+    while(*token && isspace(*token))
+       token++;
+    if (!*token)
        self_destruct();
     *var = xstrdup(token);
 }