Variable declarations

This commit is contained in:
Nick Terrell
2018-05-23 14:58:58 -07:00
parent c92dd11940
commit f2d0924b87
+10 -10
View File
@@ -73,16 +73,16 @@ size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* t
int previous0 = 0; int previous0 = 0;
if (hbSize < 4) { if (hbSize < 4) {
/* This function only works when hbSize >= 4 */ /* This function only works when hbSize >= 4 */
char buffer[4]; char buffer[4];
memset(buffer, 0, sizeof(buffer)); memset(buffer, 0, sizeof(buffer));
memcpy(buffer, headerBuffer, hbSize); memcpy(buffer, headerBuffer, hbSize);
size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr, { size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr,
buffer, sizeof(buffer)); buffer, sizeof(buffer));
if (FSE_isError(countSize)) return countSize; if (FSE_isError(countSize)) return countSize;
if (countSize > hbSize) return ERROR(corruption_detected); if (countSize > hbSize) return ERROR(corruption_detected);
return countSize; return countSize;
} } }
assert(hbSize >= 4); assert(hbSize >= 4);
bitStream = MEM_readLE32(ip); bitStream = MEM_readLE32(ip);