From 9d194eb6f50e8718a6d6f8f1e1f0bf3ddf4065f1 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Mon, 11 Sep 2017 14:52:32 -0700 Subject: [PATCH] Remove redundant condition --- sampler.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sampler.go b/sampler.go index 9520d32..458eae9 100644 --- a/sampler.go +++ b/sampler.go @@ -31,10 +31,8 @@ func (s RandomSampler) Sample(lvl Level) bool { if s <= 0 { return false } - if s > 0 { - if rand.Intn(int(s)) != 0 { - return false - } + if rand.Intn(int(s)) != 0 { + return false } return true }