From 56578602abdb051629aa317fd26fb298182f628c Mon Sep 17 00:00:00 2001 From: Yao Zengzeng Date: Fri, 26 Jul 2019 16:54:06 +0800 Subject: [PATCH] remove redundant condition judgement whether cut new chunk (#669) Signed-off-by: YaoZengzeng --- chunks/chunks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chunks/chunks.go b/chunks/chunks.go index bd7b9e765..8c6945ca8 100644 --- a/chunks/chunks.go +++ b/chunks/chunks.go @@ -295,7 +295,7 @@ func (w *Writer) WriteChunks(chks ...Meta) error { } newsz := w.n + maxLen - if w.wbuf == nil || w.n > w.segmentSize || newsz > w.segmentSize && maxLen <= w.segmentSize { + if w.wbuf == nil || newsz > w.segmentSize && maxLen <= w.segmentSize { if err := w.cut(); err != nil { return err }