]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
dont complain about no units on zeros
authorwessels <>
Thu, 9 Apr 1998 05:49:00 +0000 (05:49 +0000)
committerwessels <>
Thu, 9 Apr 1998 05:49:00 +0000 (05:49 +0000)
src/cache_cf.cc

index 21dd516765cb1057dabc9f259ffd79487f6895d8..a88d42d2023de00bdfbbeed7a063c54e9df6db8b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.272 1998/04/08 21:38:35 wessels Exp $
+ * $Id: cache_cf.cc,v 1.273 1998/04/08 23:49:00 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -294,7 +294,7 @@ parseTimeLine(time_t * tptr, const char *units)
        self_destruct();
     d = atof(token);
     m = u;                     /* default to 'units' if none specified */
-    if ((token = strtok(NULL, w_space)) == NULL)
+    if (d && (token = strtok(NULL, w_space)) == NULL)
        debug(3, 0) ("WARNING: No units on '%s', assuming %f %s\n",
            config_input_line, d, units);
     else if ((m = parseTimeUnits(token)) == 0)
@@ -340,7 +340,7 @@ parseBytesLine(size_t * bptr, const char *units)
        self_destruct();
     d = atof(token);
     m = u;                     /* default to 'units' if none specified */
-    if ((token = strtok(NULL, w_space)) == NULL)
+    if (d && (token = strtok(NULL, w_space)) == NULL)
        debug(3, 0) ("WARNING: No units on '%s', assuming %f %s\n",
            config_input_line, d, units);
     else if ((m = parseBytesUnits(token)) == 0)