Skip to content

Commit 0e32cf3

Browse files
committed
use int64 for all of the consts
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
1 parent d6ec1cd commit 0e32cf3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/file/file.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package file
22

33
// common values used across malcontent for extracting and reading files.
44
const (
5-
DefaultPoolBuffer int = 4 * 1024 // 4KB
6-
ExtractBuffer = 64 * 1024 // 64KB
7-
MaxPoolBuffer int = 128 * 1024 // 128KB
8-
MaxBytes = 1 << 32 // 2048MB
5+
DefaultPoolBuffer int64 = 4 * 1024 // 4KB
6+
ExtractBuffer int64 = 64 * 1024 // 64KB
7+
MaxPoolBuffer int64 = 128 * 1024 // 128KB
8+
MaxBytes int64 = 1 << 32 // 2048MB
99
ReadBuffer int64 = 64 * 1024 // 64KB
10-
ZipBuffer = 2 * 1024 // 2KB
10+
ZipBuffer int64 = 2 * 1024 // 2KB
1111
)

pkg/pool/pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (bp *BufferPool) Put(buf []byte) {
6262

6363
clear(buf)
6464
bufPtr := &buf
65-
if cap(*bufPtr) <= file.MaxPoolBuffer {
65+
if int64(cap(*bufPtr)) <= file.MaxPoolBuffer {
6666
bp.pool.Put(bufPtr)
6767
}
6868
}

0 commit comments

Comments
 (0)