]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix some minor casting errors affecting cachemgr reporting when cache/mem >2GB
authorhno <>
Mon, 7 Jan 2008 22:45:57 +0000 (22:45 +0000)
committerhno <>
Mon, 7 Jan 2008 22:45:57 +0000 (22:45 +0000)
src/stat.cc

index a7eb6afed761c65c84a27ec87803764b79f4e442..8ed6fb3594189c13f676868bae455ca366a0928c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: stat.cc,v 1.412 2007/12/27 01:58:19 hno Exp $
+ * $Id: stat.cc,v 1.413 2008/01/07 15:45:57 hno Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -542,16 +542,16 @@ info_get(StoreEntry * sentry)
                       store_swap_size);
 
     storeAppendPrintf(sentry, "\tStorage Swap capacity:\t%4.1f%% used, %4.1f%% free\n",
-                      dpercent((int) store_swap_size, (int) Store::Root().maxSize()),  
-                      dpercent((int) (Store::Root().maxSize() - store_swap_size), (int) Store::Root().maxSize()));
+                      dpercent(store_swap_size, Store::Root().maxSize()),  
+                      dpercent((Store::Root().maxSize() - store_swap_size), Store::Root().maxSize()));
 
 
-    storeAppendPrintf(sentry, "\tStorage Mem size:\t%d KB\n",
-                      mem_node::StoreMemSize() >> 10);
+    storeAppendPrintf(sentry, "\tStorage Mem size:\t%lu KB\n",
+                      (unsigned long)mem_node::StoreMemSize() >> 10);
 
     storeAppendPrintf(sentry, "\tStorage Mem capacity:\t%4.1f%% used, %4.1f%% free\n",
                       dpercent(mem_node::InUseCount(), store_pages_max),
-                      dpercent(((double)store_pages_max - mem_node::InUseCount()), store_pages_max));
+                      dpercent((store_pages_max - mem_node::InUseCount()), store_pages_max));
 
     storeAppendPrintf(sentry, "\tMean Object Size:\t%0.2f KB\n",
                       n_disk_objects ? (double) store_swap_size / n_disk_objects : 0.0);