From 5fbc153e0f849819e42bdd431106c0b6332507e5 Mon Sep 17 00:00:00 2001 From: Yug Gupta Date: Sun, 14 Jun 2020 22:35:02 +0530 Subject: [PATCH] cephfs: fix IneffAssign warnings in resizeVolume() IneffAssign warns about the two following statements: Line 147: warning: ineffectual assignment to supported (ineffassign) Line 148: warning: ineffectual assignment to ok (ineffassign) Reported-by: https://goreportcard.com/report/github.com/ceph/ceph-csi Updates: #975 Signed-off-by: Yug Gupta --- internal/cephfs/volume.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/cephfs/volume.go b/internal/cephfs/volume.go index 9a7c00059..d60b4de4b 100644 --- a/internal/cephfs/volume.go +++ b/internal/cephfs/volume.go @@ -144,10 +144,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Crede // subvolume. If the command is not available as a fallback it will use // CreateVolume to resize the subvolume. func resizeVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Credentials, volID volumeID, bytesQuota int64) error { - supported := false - ok := false - - if supported, ok = resizeSupportedList[volOptions.ClusterID]; supported || !ok { + if supported, ok := resizeSupportedList[volOptions.ClusterID]; supported || !ok { args := []string{ "fs", "subvolume",