]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[linux-kernel] Fix clang-format edge case with goto labels
authorNick Terrell <terrelln@fb.com>
Thu, 25 May 2017 20:56:46 +0000 (13:56 -0700)
committerNick Terrell <terrelln@fb.com>
Thu, 25 May 2017 20:56:46 +0000 (13:56 -0700)
contrib/linux-kernel/lib/zstd/compress.c
contrib/linux-kernel/lib/zstd/zstd_opt.h

index f2940a146f5fa2a98ebb5df32c2aafb6f14f5b59..42236a3e1e1a19ba24484eea65d2571767f44b7c 100644 (file)
@@ -816,14 +816,15 @@ ZSTD_STATIC size_t ZSTD_compressSequences(ZSTD_CCtx *zc, void *dst, size_t dstCa
        }
 
 /* check compressibility */
-_check_compressibility : {
-       size_t const minGain = ZSTD_minGain(srcSize);
-       size_t const maxCSize = srcSize - minGain;
-       if ((size_t)(op - ostart) >= maxCSize) {
-               zc->flagStaticHufTable = HUF_repeat_none;
-               return 0;
+_check_compressibility:
+       {
+               size_t const minGain = ZSTD_minGain(srcSize);
+               size_t const maxCSize = srcSize - minGain;
+               if ((size_t)(op - ostart) >= maxCSize) {
+                       zc->flagStaticHufTable = HUF_repeat_none;
+                       return 0;
+               }
        }
-}
 
        /* confirm repcodes */
        {
@@ -1990,11 +1991,12 @@ void ZSTD_compressBlock_lazy_generic(ZSTD_CCtx *ctx, const void *src, size_t src
                }
 
        /* store sequence */
-       _storeSequence : {
-               size_t const litLength = start - anchor;
-               ZSTD_storeSeq(seqStorePtr, litLength, anchor, (U32)offset, matchLength - MINMATCH);
-               anchor = ip = start + matchLength;
-       }
+_storeSequence:
+               {
+                       size_t const litLength = start - anchor;
+                       ZSTD_storeSeq(seqStorePtr, litLength, anchor, (U32)offset, matchLength - MINMATCH);
+                       anchor = ip = start + matchLength;
+               }
 
                /* check immediate repcode */
                while ((ip <= ilimit) && ((offset_2 > 0) & (ZSTD_read32(ip) == ZSTD_read32(ip - offset_2)))) {
index 468c14368d938f29a7dddcea7829a03a262455e2..55e1b4cba8088c59c4c17fb8aaf91a9dc9263819 100644 (file)
@@ -628,7 +628,7 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx *ctx, const void *src, size_t srcS
                cur = last_pos - best_mlen;
 
        /* store sequence */
-       _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
+_storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
                opt[0].mlen = 1;
 
                while (1) {
@@ -942,7 +942,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx *ctx, const void *src, siz
                cur = last_pos - best_mlen;
 
        /* store sequence */
-       _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
+_storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
                opt[0].mlen = 1;
 
                while (1) {