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 2017/05/15 17:59:12 UTC
[trafficserver] branch master updated: Coverity 1375126,
1375120 Ignore drand48() warning in jtest.cc
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 7f7e2f1 Coverity 1375126, 1375120 Ignore drand48() warning in jtest.cc
7f7e2f1 is described below
commit 7f7e2f177c15435915742b106daff93a36059db9
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Mon May 15 08:53:28 2017 -0400
Coverity 1375126, 1375120 Ignore drand48() warning in jtest.cc
---
tools/jtest/jtest.cc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index ba33890..61298b7 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -1385,8 +1385,8 @@ read_ftp_request(int sock)
return 0;
} else if (STREQ(buffer, "MDTM")) {
double err_rand = 1.0;
- // coverity[dont_call]
if (ftp_mdtm_err_rate != 0.0) {
+ // coverity[dont_call]
err_rand = drand48();
}
if (err_rand < ftp_mdtm_err_rate) {
@@ -2759,7 +2759,9 @@ make_range_header(int sock, double dr, char *rbuf, int size_limit)
return;
tmp[0] = gen_bfc_dist(dr - 1.0);
+ // coverity[dont_call]
tmp[1] = ((int)(drand48() * 1000000)) % (tmp[0] - 1 - 0 + 1);
+ // coverity[dont_call]
tmp[2] = ((int)(drand48() * 1000000)) % (tmp[0] - 1 - 0 + 1) + tmp[1] + 100;
if (tmp[0] > 100) {
@@ -2786,8 +2788,10 @@ make_range_header(int sock, double dr, char *rbuf, int size_limit)
static void
make_random_url(int sock, double *dr, double *h)
{
+ // coverity[dont_call]
*dr = drand48();
- *h = drand48();
+ // coverity[dont_call]
+ *h = drand48();
if (zipf == 0.0) {
if (*h < hitrate) {
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].