From: wessels <> Date: Sat, 9 Dec 2000 11:16:07 +0000 (+0000) Subject: Some people might want a zero-size cache on purpose. So if cache size X-Git-Tag: SQUID_3_0_PRE1~1735 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82e2afd95edb742dc911a6cd0401c16933c9dec4;p=thirdparty%2Fsquid.git Some people might want a zero-size cache on purpose. So if cache size is zero, don't exit with a fatal warning that cache size is smaller than memory size. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 7a77bff1c5..f5e04afb5f 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.360 2000/12/05 10:10:57 wessels Exp $ + * $Id: cache_cf.cc,v 1.361 2000/12/09 04:16:07 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -264,7 +264,10 @@ configDoConfigure(void) fatal("No cache_dir's specified in config file"); /* calculate Config.Swap.maxSize */ storeDirConfigure(); - if (Config.Swap.maxSize < (Config.memMaxSize >> 10)) + if (0 == Config.Swap.maxSize) + /* people might want a zero-sized cache on purpose */ + (void) 0; + else if (Config.Swap.maxSize < (Config.memMaxSize >> 10)) fatal("cache_swap is lower than cache_mem"); if (Config.Announce.period > 0) { Config.onoff.announce = 1;