trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject trafficserver git commit: Fix coverity warning on losing precision in integer division.
Date Sun, 04 Jan 2015 21:14:09 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 233727cda -> de82c174a


Fix coverity warning on losing precision in integer division.

Coverity CID #1261571


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/de82c174
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/de82c174
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/de82c174

Branch: refs/heads/master
Commit: de82c174a11f821c8002ffb454aacf92b0262ee8
Parents: 233727c
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Sun Jan 4 14:13:05 2015 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Sun Jan 4 14:13:05 2015 -0700

----------------------------------------------------------------------
 iocore/net/SSLConfig.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/de82c174/iocore/net/SSLConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLConfig.cc b/iocore/net/SSLConfig.cc
index 88f2630..99bbb69 100644
--- a/iocore/net/SSLConfig.cc
+++ b/iocore/net/SSLConfig.cc
@@ -257,11 +257,12 @@ SSLConfigParams::initialize()
   REC_ReadConfigInteger(ssl_session_cache, "proxy.config.ssl.session_cache");
   REC_ReadConfigInteger(ssl_session_cache_size, "proxy.config.ssl.session_cache.size");
   REC_ReadConfigInteger(ssl_session_cache_num_buckets, "proxy.config.ssl.session_cache.num_buckets");
-  REC_ReadConfigInteger(ssl_session_cache_skip_on_contention, "proxy.config.ssl.session_cache.skip_cache_on_bucket_contention");
+  REC_ReadConfigInteger(ssl_session_cache_skip_on_contention,
+                        "proxy.config.ssl.session_cache.skip_cache_on_bucket_contention");
   REC_ReadConfigInteger(ssl_session_cache_timeout, "proxy.config.ssl.session_cache.timeout");
   REC_ReadConfigInteger(ssl_session_cache_auto_clear, "proxy.config.ssl.session_cache.auto_clear");
 
-  SSLConfigParams::session_cache_max_bucket_size = ceil(ssl_session_cache_size/ssl_session_cache_num_buckets
);
+  SSLConfigParams::session_cache_max_bucket_size = ceil((double)ssl_session_cache_size/ssl_session_cache_num_buckets
);
   SSLConfigParams::session_cache_skip_on_lock_contention = ssl_session_cache_skip_on_contention;
   SSLConfigParams::session_cache_number_buckets = ssl_session_cache_num_buckets;
 


Mime
View raw message