From: hno <> Date: Sun, 10 Nov 2002 11:22:03 +0000 (+0000) Subject: C typecasts in CARP code X-Git-Tag: SQUID_3_0_PRE1~536 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff83713b0164bb8dcd55eb88da7aa228788a7d80;p=thirdparty%2Fsquid.git C typecasts in CARP code --- diff --git a/src/carp.cc b/src/carp.cc index 6d5c212ef9..0bc6b0d083 100644 --- a/src/carp.cc +++ b/src/carp.cc @@ -1,6 +1,6 @@ /* - * $Id: carp.cc,v 1.20 2002/10/13 20:34:59 robertc Exp $ + * $Id: carp.cc,v 1.21 2002/11/10 04:22:03 hno Exp $ * * DEBUG: section 39 Cache Array Routing Protocol * AUTHOR: Henrik Nordstrom @@ -48,7 +48,8 @@ static OBJH carpCachemgr; static int peerSortWeight(const void *a, const void *b) { - const peer *const *p1 = a, *const *p2 = b; + const peer *const *p1 = (const peer *const *)a; + const peer *const *p2 = (const peer *const *)b; return (*p1)->weight - (*p2)->weight; } @@ -80,7 +81,7 @@ carpInit(void) } if (n_carp_peers == 0) return; - carp_peers = xcalloc(n_carp_peers, sizeof(*carp_peers)); + carp_peers = (peer **)xcalloc(n_carp_peers, sizeof(*carp_peers)); /* Build a list of the found peers and calculate hashes and load factors */ for (P = carp_peers, p = Config.peers; p; p = p->next) { if (!p->options.carp)