From: adrian <> Date: Wed, 3 Mar 2004 16:34:58 +0000 (+0000) Subject: Explicit casting crack which seems to actually work. X-Git-Tag: SQUID_3_0_PRE4~1132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81ec98e4495e4092838cb3fb8f379620989d464f;p=thirdparty%2Fsquid.git Explicit casting crack which seems to actually work. Without this, it keeps using -1 as a maxsize during the calculation. --- diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index b408466924..9d1f590ffa 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.51 2003/09/01 03:49:42 robertc Exp $ + * $Id: store_dir_coss.cc,v 1.52 2004/03/03 09:34:58 adrian Exp $ * * DEBUG: section 47 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -827,7 +827,7 @@ CossSwapDir::parse(int anIndex, char *aPath) { unsigned int i; unsigned int size; - off_t max_offset; + unsigned long max_offset; i = GetInteger(); size = i << 10; /* Mbytes to Kbytes */ @@ -856,9 +856,9 @@ CossSwapDir::parse(int anIndex, char *aPath) * largest possible sfileno, assuming sfileno is a 25-bit * signed integer, as defined in structs.h. */ - max_offset = (off_t) 0xFFFFFF << blksz_bits; + max_offset = (unsigned long) 0xFFFFFF << blksz_bits; - if (max_size > (max_offset>>10)) { + if ((unsigned long)max_size > (unsigned long)(max_offset>>10)) { debug(47,0)("COSS block-size = %d bytes\n", 1<