You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2015/02/08 06:12:24 UTC

trafficserver git commit: TS-3287 Ignore rand() issues

Repository: trafficserver
Updated Branches:
  refs/heads/master f2a7e2895 -> 6662bee36


TS-3287 Ignore rand() issues

Coverity CID #1261591 #1261581


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

Branch: refs/heads/master
Commit: 6662bee36ed475b9f5f25ce4282f196e772b32f5
Parents: f2a7e28
Author: Leif Hedstrom <zw...@apache.org>
Authored: Sat Feb 7 22:11:10 2015 -0700
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Sat Feb 7 22:11:10 2015 -0700

----------------------------------------------------------------------
 iocore/cache/CacheDir.cc                    | 2 +-
 plugins/experimental/esi/lib/FailureInfo.cc | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6662bee3/iocore/cache/CacheDir.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index c522ca0..36b0e33 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -1407,7 +1407,7 @@ regress_rand_CacheKey(CacheKey *key)
 void
 dir_corrupt_bucket(Dir *b, int s, Vol *d)
 {
-  // coverity[secure_coding]
+  // coverity[dont_call]
   int l = ((int) (dir_bucket_length(b, s, d) * drand48()));
   Dir *e = b;
   Dir *seg = dir_segment(s, d);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6662bee3/plugins/experimental/esi/lib/FailureInfo.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/FailureInfo.cc b/plugins/experimental/esi/lib/FailureInfo.cc
index 2541f8c..744209d 100644
--- a/plugins/experimental/esi/lib/FailureInfo.cc
+++ b/plugins/experimental/esi/lib/FailureInfo.cc
@@ -96,6 +96,7 @@ bool FailureInfo::isAttemptReq()
             prob=_avgOverWindow;
 
         _debugLog(_debug_tag,"[%s] Calculated probability is %lf",__FUNCTION__,prob);
+        // coverity[dont_call]
         int decision=rand()%100;
 
         if(decision<prob*100) {