From: wessels <> Date: Thu, 9 Apr 1998 05:49:00 +0000 (+0000) Subject: dont complain about no units on zeros X-Git-Tag: SQUID_3_0_PRE1~3548 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bdc09b359b41294264d1f663694fcb756a4a0a6;p=thirdparty%2Fsquid.git dont complain about no units on zeros --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 21dd516765..a88d42d202 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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)