1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-01 09:47:01 +03:00

Address PR comments and minor fixes

This commit is contained in:
Sean Purcell
2017-04-12 10:57:38 -07:00
parent d048fefef7
commit e80f1d74b3
6 changed files with 20 additions and 10 deletions

View File

@ -39,7 +39,7 @@ static U32 ZSTD_seekable_offsetToChunk(const seekTable_t* table, U64 pos)
U32 hi = table->tableLen;
while (lo + 1 < hi) {
U32 mid = lo + ((hi - lo) >> 1);
U32 const mid = lo + ((hi - lo) >> 1);
if (table->entries[mid].dOffset <= pos) {
lo = mid;
} else {
@ -139,7 +139,7 @@ size_t ZSTD_seekable_loadSeekTable(ZSTD_seekable_DStream* zds, const void* src,
if (srcSize < frameSize) return frameSize;
if ((MEM_readLE32(base) & 0xFFFFFFF0U) != ZSTD_MAGIC_SKIPPABLE_START) {
if (MEM_readLE32(base) != (ZSTD_MAGIC_SKIPPABLE_START | 0xE)) {
return ERROR(prefix_unknown);
}
if (MEM_readLE32(base+4) + ZSTD_skippableHeaderSize != frameSize) {