Skip to content

Commit

Permalink
rbd: Do not use standard names as function arguments
Browse files Browse the repository at this point in the history
'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 <[email protected]>
  • Loading branch information
anoopcs9 authored and mergify[bot] committed Sep 24, 2024
1 parent b52c04c commit b4bdfbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rbd/snapshot_octopus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b4bdfbd

Please sign in to comment.