nit: remove unnecessary if-else block

Signed-off-by: Payes Anand <payes.anand@mayadata.io>
This commit is contained in:
Payes Anand
2020-12-06 13:44:13 +05:30
parent ec418673cb
commit e5e3c09feb

View File

@@ -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()
}