]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Variable declarations 1146/head
authorNick Terrell <terrelln@fb.com>
Wed, 23 May 2018 21:58:58 +0000 (14:58 -0700)
committerNick Terrell <terrelln@fb.com>
Wed, 23 May 2018 21:58:58 +0000 (14:58 -0700)
lib/common/entropy_common.c

index 2edb6e9be51384f81bf84e337d096eee6bbbd2e1..33fd04bd660607cd11b2a1f06d8a5cf65cc1ef66 100644 (file)
@@ -73,16 +73,16 @@ size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* t
     int previous0 = 0;
 
     if (hbSize < 4) {
-      /* This function only works when hbSize >= 4 */
-      char buffer[4];
-      memset(buffer, 0, sizeof(buffer));
-      memcpy(buffer, headerBuffer, hbSize);
-      size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr,
-                                              buffer, sizeof(buffer));
-      if (FSE_isError(countSize)) return countSize;
-      if (countSize > hbSize) return ERROR(corruption_detected);
-      return countSize;
-    }
+        /* This function only works when hbSize >= 4 */
+        char buffer[4];
+        memset(buffer, 0, sizeof(buffer));
+        memcpy(buffer, headerBuffer, hbSize);
+        {   size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr,
+                                                    buffer, sizeof(buffer));
+            if (FSE_isError(countSize)) return countSize;
+            if (countSize > hbSize) return ERROR(corruption_detected);
+            return countSize;
+    }   }
     assert(hbSize >= 4);
 
     bitStream = MEM_readLE32(ip);