From 1a430e5f894d6575478bcef52d25bfbe7134947e Mon Sep 17 00:00:00 2001 From: jinglina Date: Thu, 29 Jul 2021 20:56:57 +0800 Subject: [PATCH] remove redundant parentheses (#9134) Signed-off-by: jinglina --- tsdb/chunkenc/bstream.go | 2 +- tsdb/chunks/head_chunks.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tsdb/chunkenc/bstream.go b/tsdb/chunkenc/bstream.go index ad8077c27..c8efeab1d 100644 --- a/tsdb/chunkenc/bstream.go +++ b/tsdb/chunkenc/bstream.go @@ -95,7 +95,7 @@ func (b *bstream) writeByte(byt byte) { } func (b *bstream) writeBits(u uint64, nbits int) { - u <<= (64 - uint(nbits)) + u <<= 64 - uint(nbits) for nbits >= 8 { byt := byte(u >> 56) b.writeByte(byt) diff --git a/tsdb/chunks/head_chunks.go b/tsdb/chunks/head_chunks.go index bc6915c80..1443e0bd4 100644 --- a/tsdb/chunks/head_chunks.go +++ b/tsdb/chunks/head_chunks.go @@ -386,7 +386,7 @@ func (cdm *ChunkDiskMapper) cut() (returnErr error) { cdm.readPathMtx.Unlock() } - mmapFile, err := fileutil.OpenMmapFileWithSize(newFile.Name(), int(MaxHeadChunkFileSize)) + mmapFile, err := fileutil.OpenMmapFileWithSize(newFile.Name(), MaxHeadChunkFileSize) if err != nil { return err }