Ineffassign fixes for pkg/volume

Along resolves errors whitelisted in hack/.staticcheck_failures
This commit is contained in:
Alena Prokharchyk
2020-01-30 14:29:56 -08:00
parent a06d16565c
commit 331cd94ccc
8 changed files with 23 additions and 12 deletions

View File

@@ -355,7 +355,7 @@ func (util *RBDUtil) rbdUnlock(b rbdMounter) error {
if len(locker) > 0 {
args := []string{"lock", "remove", b.Image, lock_id, locker, "--pool", b.Pool, "--id", b.Id, "-m", mon}
args = append(args, secret_opt...)
cmd, err = b.exec.Command("rbd", args...).CombinedOutput()
_, err = b.exec.Command("rbd", args...).CombinedOutput()
if err == nil {
klog.V(4).Infof("rbd: successfully remove lock (locker_id: %s) on image: %s/%s with id %s mon %s", lock_id, b.Pool, b.Image, b.Id, mon)
} else {