mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
cleanup: address ifshort linter issues
This commit addresses ifshort linter issues which checks if short syntax for if-statements is possible. updates: #1586 Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -156,8 +156,7 @@ func (cp *ConnPool) Get(monitors, user, keyfile string) (*rados.Conn, error) {
|
||||
|
||||
cp.lock.Lock()
|
||||
defer cp.lock.Unlock()
|
||||
oldConn := cp.getConn(unique)
|
||||
if oldConn != nil {
|
||||
if oldConn := cp.getConn(unique); oldConn != nil {
|
||||
// there was a race, oldConn already exists
|
||||
ce.destroy()
|
||||
return oldConn, nil
|
||||
|
Reference in New Issue
Block a user