summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/dht/src/tier.c1
-rw-r--r--xlators/debug/error-gen/src/error-gen.c2
-rw-r--r--xlators/features/locks/src/common.c1
3 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 4103274..b13c41c 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -445,6 +445,7 @@ tier_do_migration (xlator_t *this, int promote)
migrate = promote ? 0 : 1;
break;
case TIER_WM_MID:
+ /* coverty[DC.WEAK_CRYPTO] */
rand = random() % 100;
if (promote) {
migrate = (rand > tier_conf->percent_full);
diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c
index b6b17ba..103c302 100644
--- a/xlators/debug/error-gen/src/error-gen.c
+++ b/xlators/debug/error-gen/src/error-gen.c
@@ -178,6 +178,7 @@ generate_rand_no (int op_no)
int rand_no = 0;
if (op_no < GF_FOP_MAXVALUE)
+ /* coverty[DC.WEAK_CRYPTO] */
rand_no = rand () % error_no_list[op_no].error_no_count;
return rand_no;
}
@@ -367,6 +368,7 @@ error_gen (xlator_t *this, int op_no)
ret = error_no_list[op_no].error_no[rand_no];
}
if (egp->random_failure == _gf_true)
+ /* coverty[DC.WEAK_CRYPTO] */
egp->failure_iter_no = 3 + (rand () % GF_UNIVERSAL_ANSWER);
}
return ret;
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index 8cdff0d..68f253d 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -1129,6 +1129,7 @@ pl_does_monkey_want_stuck_lock()
long int monkey_unlock_rand = 0;
long int monkey_unlock_rand_rem = 0;
+ /* coverty[DC.WEAK_CRYPTO] */
monkey_unlock_rand = random ();
monkey_unlock_rand_rem = monkey_unlock_rand % 100;
if (monkey_unlock_rand_rem == 0)