From b4bdfbdb232aa00199f2fa3b321c030ace27b535 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Tue, 24 Sep 2024 18:01:17 +0530 Subject: [PATCH] rbd: Do not use standard names as function arguments 'len' is already a standard library function. revive v1.4.0[1] started looking into function related variables for such standard names as part of redefines-builtin-id rule. Therefore use a different variable name instead of 'len'. [1] https://github.com/mgechev/revive/releases/tag/v1.4.0 Signed-off-by: Anoop C S --- rbd/snapshot_octopus.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rbd/snapshot_octopus.go b/rbd/snapshot_octopus.go index 86b8e77d3f..4bd008a740 100644 --- a/rbd/snapshot_octopus.go +++ b/rbd/snapshot_octopus.go @@ -50,8 +50,8 @@ func (image *Image) GetSnapByID(snapID uint64) (string, error) { err error ) // range from 1k to 64KiB - retry.WithSizes(1024, 1<<16, func(len int) retry.Hint { - cLen := C.size_t(len) + retry.WithSizes(1024, 1<<16, func(length int) retry.Hint { + cLen := C.size_t(length) buf = make([]byte, cLen) ret := C.rbd_snap_get_name( image.image,