From: wessels <> Date: Fri, 24 Oct 1997 02:47:53 +0000 (+0000) Subject: change fatal_dump to assert() X-Git-Tag: SQUID_3_0_PRE1~4722 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d80d9a6e8fb6146f2b8b3c110361563a5d8ad83;p=thirdparty%2Fsquid.git change fatal_dump to assert() --- diff --git a/src/store_dir.cc b/src/store_dir.cc index e7f84ac9c1..23bf45de0a 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir.cc,v 1.31 1997/10/17 23:31:51 wessels Exp $ + * $Id: store_dir.cc,v 1.32 1997/10/23 20:47:53 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -195,8 +195,7 @@ storeDirMapAllocate(void) char * storeSwapDir(int dirn) { - if (dirn < 0 || dirn >= Config.cacheSwap.n_configured) - fatal_dump("storeSwapDir: bad index"); + assert(0 <= dirn && dirn < Config.cacheSwap.n_configured); return Config.cacheSwap.swapDirs[dirn].path; } @@ -217,8 +216,7 @@ storeDirSwapLog(const StoreEntry * e) { LOCAL_ARRAY(char, logmsg, MAX_URL << 1); int dirn; - if (e->swap_file_number < 0) - fatal_dump("storeDirSwapLog: swap_file_number < 0"); + assert(e->swap_file_number >= 0); dirn = e->swap_file_number >> SWAP_DIR_SHIFT; assert(dirn < Config.cacheSwap.n_configured); assert(!BIT_TEST(e->flag, KEY_PRIVATE));