From e5e3c09febbb1195e29384a9eb5c95721a1e0cda Mon Sep 17 00:00:00 2001 From: Payes Anand Date: Sun, 6 Dec 2020 13:44:13 +0530 Subject: [PATCH] nit: remove unnecessary if-else block Signed-off-by: Payes Anand --- pkg/port/iscsit/iscsid.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/port/iscsit/iscsid.go b/pkg/port/iscsit/iscsid.go index 786a470..1f37aeb 100644 --- a/pkg/port/iscsit/iscsid.go +++ b/pkg/port/iscsit/iscsid.go @@ -949,10 +949,6 @@ func (s *ISCSITargetDriver) UpdateStats(conn *iscsiConnection) { s.TargetStats.TotalWriteBlockCount += int64(conn.resp.ExpectedDataLen) break } - if _, ok := s.TargetStats.SCSIIOCount[(int)(conn.resp.SCSIOpCode)]; ok != false { - s.TargetStats.SCSIIOCount[(int)(conn.resp.SCSIOpCode)] += 1 - } else { - s.TargetStats.SCSIIOCount[(int)(conn.resp.SCSIOpCode)] = 1 - } + s.TargetStats.SCSIIOCount[(int)(conn.resp.SCSIOpCode)] += 1 s.mu.Unlock() }