Remove redundant else
blocks
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
@@ -194,9 +194,9 @@ func (ctrl *csiSnapshotController) syncSnapshot(snapshot *crdv1.VolumeSnapshot)
|
||||
|
||||
if !snapshot.Status.ReadyToUse {
|
||||
return ctrl.syncUnreadySnapshot(snapshot)
|
||||
} else {
|
||||
return ctrl.syncReadySnapshot(snapshot)
|
||||
}
|
||||
return ctrl.syncReadySnapshot(snapshot)
|
||||
|
||||
}
|
||||
|
||||
// syncReadySnapshot checks the snapshot which has been bound to snapshot content successfully before.
|
||||
@@ -567,9 +567,8 @@ func (ctrl *csiSnapshotController) checkandUpdateBoundSnapshotStatusOperation(sn
|
||||
if err != nil {
|
||||
glog.Errorf("checkandUpdateBoundSnapshotStatusOperation: failed to call create snapshot to check whether the snapshot is ready to use %q", err)
|
||||
return nil, err
|
||||
} else {
|
||||
glog.V(5).Infof("checkandUpdateBoundSnapshotStatusOperation: driver %s, snapshotId %s, timestamp %d, size %d, readyToUse %t", driverName, snapshotID, timestamp, size, readyToUse)
|
||||
}
|
||||
glog.V(5).Infof("checkandUpdateBoundSnapshotStatusOperation: driver %s, snapshotId %s, timestamp %d, size %d, readyToUse %t", driverName, snapshotID, timestamp, size, readyToUse)
|
||||
|
||||
if timestamp == 0 {
|
||||
timestamp = time.Now().UnixNano()
|
||||
@@ -820,9 +819,9 @@ func (ctrl *csiSnapshotController) updateSnapshotStatus(snapshot *crdv1.VolumeSn
|
||||
newSnapshotObj, err := ctrl.clientset.VolumesnapshotV1alpha1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone)
|
||||
if err != nil {
|
||||
return nil, newControllerUpdateError(snapshotKey(snapshot), err.Error())
|
||||
} else {
|
||||
return newSnapshotObj, nil
|
||||
}
|
||||
return newSnapshotObj, nil
|
||||
|
||||
}
|
||||
return snapshot, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user