mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cephfs: avoid variable shadowing
Avoiding variable shadowing as it becomes hard to debug this kind of issues in real enviroment. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
c25f572ae0
commit
1b39b82a85
@ -157,7 +157,9 @@ func (s *subVolumeClient) CreateCloneFromSnapshot(
|
||||
}
|
||||
}
|
||||
}()
|
||||
cloneState, err := s.GetCloneState(ctx)
|
||||
var cloneState cephFSCloneState
|
||||
// avoid err variable shadowing
|
||||
cloneState, err = s.GetCloneState(ctx)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed to get clone state: %v", err)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user