]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
casts, lint cleanup
authorwessels <>
Fri, 19 Jul 1996 23:34:45 +0000 (23:34 +0000)
committerwessels <>
Fri, 19 Jul 1996 23:34:45 +0000 (23:34 +0000)
src/ipcache.cc
src/neighbors.cc

index 7a3bc282429d692000fff31aa96e3d5e43a41978..d3fe3a828afe57cf699941dd3074895a8dcd9025 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ipcache.cc,v 1.33 1996/07/18 20:27:04 wessels Exp $
+ * $Id: ipcache.cc,v 1.34 1996/07/19 17:34:45 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -491,7 +491,7 @@ static void ipcache_add(name, i, hp, cached)
        while ((addr_count < 255) && *(hp->h_addr_list + addr_count))
            ++addr_count;
 
-       i->addr_count = addr_count;
+       i->addr_count = (unsigned char) addr_count;
 
        /* count for Alias */
        alias_count = 0;
@@ -499,7 +499,7 @@ static void ipcache_add(name, i, hp, cached)
            while ((alias_count < 255) && hp->h_aliases[alias_count])
                ++alias_count;
 
-       i->alias_count = alias_count;
+       i->alias_count = (unsigned char) alias_count;
 
        /* copy ip addresses information */
        i->entry.h_addr_list = xcalloc(addr_count + 1, sizeof(char *));
@@ -726,7 +726,8 @@ static int ipcache_parsebuffer(buf, offset, dnsData)
                    token = strtok(tmp_ptr, w_space);
                    tmp_ptr = NULL;
                    token = strtok(tmp_ptr, w_space);
-                   i->addr_count = ipcount = atoi(token);
+                   ipcount = atoi(token);
+                   i->addr_count = (unsigned char) ipcount;
 
                    if (ipcount == 0) {
                        i->entry.h_addr_list = NULL;
@@ -762,7 +763,8 @@ static int ipcache_parsebuffer(buf, offset, dnsData)
                    token = strtok(tmp_ptr, w_space);
                    tmp_ptr = NULL;
                    token = strtok(tmp_ptr, w_space);
-                   i->alias_count = aliascount = atoi(token);
+                   aliascount = atoi(token);
+                   i->alias_count = (unsigned char) aliascount;
 
                    if (aliascount == 0) {
                        i->entry.h_aliases = NULL;
@@ -1247,7 +1249,7 @@ void stat_ipcache_get(sentry)
            i->name,
            ipcache_status_char[i->status],
            ttl,
-           i->addr_count);
+           (int) i->addr_count);
        for (k = 0; k < (int) i->addr_count; k++) {
            struct in_addr addr;
            xmemcpy(&addr, *(i->entry.h_addr_list + k), i->entry.h_length);
index 775d155dbbcb3c0fc7269526f8fc7075bf5605a1..7d9c45da1a7024b9af611a6389b9fdc078f33c64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.31 1996/07/18 20:27:06 wessels Exp $
+ * $Id: neighbors.cc,v 1.32 1996/07/19 17:35:23 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -112,7 +112,6 @@ static neighbors *friends = NULL;
 static struct neighbor_cf *Neighbor_cf = NULL;
 static icp_common_t echo_hdr;
 static u_short echo_port;
-static struct in_addr any_addr;
 
 FILE *cache_hierarchy_log = NULL;
 
@@ -622,7 +621,7 @@ void neighborsUdpAck(fd, url, header, from, entry, data, data_sz)
 
     debug(15, 6, "neighborsUdpAck: opcode %d '%s'\n",
        (int) header->opcode, url);
-    if (header->opcode > ICP_OP_END)
+    if ((icp_opcode) header->opcode > ICP_OP_END)
        return;
     if (mem == NULL) {
        debug(15, 1, "Ignoring ICP reply for missing mem_obj: %s\n", url);