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 <anoopcs@cryptolab.net>
This commit is contained in:
Anoop C S 2024-09-24 18:01:17 +05:30 committed by mergify[bot]
parent b52c04c231
commit b4bdfbdb23
1 changed files with 2 additions and 2 deletions

View File

@ -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,