fix unconvert issues: unnecessary conversion

pull/5805/head
Mario Trangoni 7 years ago
parent 195bc0d286
commit 09142e4dd1

@ -259,7 +259,7 @@ func (it *xorIterator) Next() bool {
it.err = err
return false
}
it.t = int64(t)
it.t = t
it.val = math.Float64frombits(v)
it.numRead++

@ -349,7 +349,7 @@ func (s *Reader) Chunk(ref uint64) (chunkenc.Chunk, error) {
}
b := s.bs[seq]
if int(off) >= b.Len() {
if off >= b.Len() {
return nil, errors.Errorf("offset %d beyond data size %d", off, b.Len())
}
// With the minimum chunk length this should never cause us reading

@ -737,7 +737,7 @@ func (db *DB) CleanTombstones() error {
defer db.cmtx.Unlock()
start := time.Now()
defer db.metrics.tombCleanTimer.Observe(float64(time.Since(start).Seconds()))
defer db.metrics.tombCleanTimer.Observe(time.Since(start).Seconds())
db.mtx.RLock()
blocks := db.blocks[:]

@ -780,7 +780,7 @@ func (r *Reader) readSymbols(off int) error {
for d.err() == nil && d.len() > 0 && cnt > 0 {
s := d.uvarintStr()
r.symbols[uint32(nextPos)] = s
r.symbols[nextPos] = s
if r.version == 2 {
nextPos++
@ -800,7 +800,7 @@ func (r *Reader) readOffsetTable(off uint64, f func([]string, uint64) error) err
cnt := d.be32()
for d.err() == nil && d.len() > 0 && cnt > 0 {
keyCount := int(d.uvarint())
keyCount := d.uvarint()
keys := make([]string, 0, keyCount)
for i := 0; i < keyCount; i++ {
@ -1038,7 +1038,7 @@ func (dec *Decoder) Series(b []byte, lbls *labels.Labels, chks *[]chunks.Meta) e
d := decbuf{b: b}
k := int(d.uvarint())
k := d.uvarint()
for i := 0; i < k; i++ {
lno := uint32(d.uvarint())
@ -1061,7 +1061,7 @@ func (dec *Decoder) Series(b []byte, lbls *labels.Labels, chks *[]chunks.Meta) e
}
// Read the chunks meta data.
k = int(d.uvarint())
k = d.uvarint()
if k == 0 {
return nil

Loading…
Cancel
Save