From ff2ba49d02dc99b0c3de5712348ae9d588be7ad7 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 19 Feb 2017 11:06:56 +0100 Subject: Filter coverty false positives Since random is not used for anything cryptographically related, it is fine to use it in those instances. Change-Id: I720172285f60d6bc477c7169c7286fc018ebdf8f BUG: 1424764 Signed-off-by: Michael Scherer Reviewed-on: https://review.gluster.org/16668 Smoke: Gluster Build System Tested-by: Nigel Babu NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- xlators/cluster/dht/src/tier.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/cluster/dht/src/tier.c') diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index 41032743c04..b13c41cd2ab 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); -- cgit