Skip to content

Commit d002889

Browse files
author
Jameson O'Connor
committed
appeasing linter
1 parent 1562142 commit d002889

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

internal/node/volume_stats.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ func GetFilesystemVolumeStats(volumePath string) (*csi.NodeGetVolumeStatsRespons
2929
return nil, status.Errorf(codes.Internal, "%s: %s", ErrStatfs, err)
3030
}
3131

32+
bsize := int64(statfs.Bsize) //nolint:unconvert,nolintlint // Bsize is int64 on linux, uint32 on darwin
33+
3234
//nolint:gosec // filesystem stats will not exceed int64 range
33-
availableBytes := int64(statfs.Bavail) * int64(statfs.Bsize)
35+
availableBytes := int64(statfs.Bavail) * bsize
3436
//nolint:gosec // filesystem stats will not exceed int64 range
35-
totalBytes := int64(statfs.Blocks) * int64(statfs.Bsize)
37+
totalBytes := int64(statfs.Blocks) * bsize
3638
usedBytes := totalBytes - availableBytes
3739

3840
//nolint:gosec // filesystem stats will not exceed int64 range

0 commit comments

Comments
 (0)