Skip to content

Commit 3436410

Browse files
committed
fixed incorrect assert
1 parent 3ca1194 commit 3436410

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fullbench32: CPPFLAGS += -m32
148148
$(FULLBENCHS) : CPPFLAGS += $(MULTITHREAD_CPP) -Wno-deprecated-declarations
149149
$(FULLBENCHS) : LDFLAGS += $(MULTITHREAD_LD)
150150
$(FULLBENCHS) : DEBUGFLAGS = -DNDEBUG # turn off assert() for speed measurements
151-
$(FULLBENCHS) : DEBUGLEVEL = 0 # turn off assert() for speed measurements
151+
$(FULLBENCHS) : DEBUGLEVEL ?= 0 # turn off assert() for speed measurements
152152
$(FULLBENCHS) : $(ZSTD_FILES)
153153
$(FULLBENCHS) : $(PRGDIR)/datagen.c $(PRGDIR)/lorem.c $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/benchfn.c fullbench.c
154154
$(LINK.c) $^ -o $@$(EXT)

tests/fullbench.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ local_compressSequencesAndLiterals(const void* input, size_t inputSize,
620620
# if 0 /* for tests */
621621
ZSTD_CCtx_setParameter(g_zcc, ZSTD_c_repcodeResolution, ZSTD_ps_enable);
622622
#endif
623-
assert(8 + nbSeqs * sizeof(ZSTD_Sequence) + nbLiterals == inputSize); (void)inputSize;
623+
assert(12 + nbSeqs * sizeof(ZSTD_Sequence) + nbLiterals == inputSize); (void)inputSize;
624624
(void)payload;
625625

626626
return ZSTD_compressSequencesAndLiterals(g_zcc, dst, dstCapacity, seqs, nbSeqs, literals, nbLiterals, srcSize);

0 commit comments

Comments
 (0)