]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
ldm_getNextMatch fixed return values
authorsenhuang42 <senhuang96@fb.com>
Tue, 29 Sep 2020 22:12:32 +0000 (18:12 -0400)
committersenhuang42 <senhuang96@fb.com>
Wed, 7 Oct 2020 17:56:25 +0000 (13:56 -0400)
lib/compress/zstd_opt.c

index 075826b732dae7ba3c8b9e312f8dc76b98bb04ce..25168d6fe1fc881c374e2f910e042eb89b50a7b6 100644 (file)
@@ -824,19 +824,19 @@ static void ldm_getNextMatch(rawSeqStore_t* ldmSeqStore,
     if (ldmSeqStore->pos >= ldmSeqStore->size) {
         *matchStartPosInBlock = UINT32_MAX;
         *matchEndPosInBlock = UINT32_MAX;
-        return 1;
+        return;
     }
     rawSeq seq = ldm_splitSequenceAndUpdateSeqStore(ldmSeqStore, remainingBytes);
     if (seq.offset == 0) {
         *matchStartPosInBlock = UINT32_MAX;
         *matchEndPosInBlock = UINT32_MAX;
-        return 1;
+        return;
     }
 
     *matchStartPosInBlock = currPosInBlock + seq.litLength;
     *matchEndPosInBlock = *matchStartPosInBlock + seq.matchLength;
     *matchOffset = seq.offset;
-    return 0;
+    return;
 }
 
 /* Adds an LDM if it's long enough */