Skip to content

Commit f4aab97

Browse files
committed
CR fixes
1 parent 5e4f57e commit f4aab97

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/compress/zstd_cwksp.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,17 +321,19 @@ ZSTD_cwksp_internal_advance_phase(ZSTD_cwksp* ws, ZSTD_cwksp_alloc_phase_e phase
321321
ws->initOnceStart = ZSTD_cwksp_initialAllocStart(ws);
322322

323323
{ /* Align the start of the tables to 64 bytes. Use [0, 63] bytes */
324-
void* const alloc = ws->objectEnd;
324+
void *const alloc = ws->objectEnd;
325325
size_t const bytesToAlign = ZSTD_cwksp_bytes_to_align_ptr(alloc, ZSTD_CWKSP_ALIGNMENT_BYTES);
326-
void* const objectEnd = (BYTE*)alloc + bytesToAlign;
326+
void *const objectEnd = (BYTE *) alloc + bytesToAlign;
327327
DEBUGLOG(5, "reserving table alignment addtl space: %zu", bytesToAlign);
328328
RETURN_ERROR_IF(objectEnd > ws->workspaceEnd, memory_allocation,
329329
"table phase - alignment initial allocation failed!");
330330
ws->objectEnd = objectEnd;
331331
ws->tableEnd = objectEnd; /* table area starts being empty */
332332
if (ws->tableValidEnd < ws->tableEnd) {
333333
ws->tableValidEnd = ws->tableEnd;
334-
} } }
334+
}
335+
}
336+
}
335337
ws->phase = phase;
336338
ZSTD_cwksp_assert_internal_consistency(ws);
337339
}
@@ -408,7 +410,7 @@ MEM_STATIC void* ZSTD_cwksp_reserve_aligned_init_once(ZSTD_cwksp* ws, size_t byt
408410
* 2. Another initOnce buffer that has been allocated before (and so was previously memset)
409411
* 3. An ASAN redzone, in which case we don't want to write on it
410412
* For these reasons it should be fine to not explicitly zero every byte up to ws->initOnceStart.
411-
* Note that we assume here tha MSAN and ASAN cannot run in the same time. */
413+
* Note that we assume here that MSAN and ASAN cannot run in the same time. */
412414
ZSTD_memset(ptr, 0, MIN((size_t)((U8*)ws->initOnceStart - (U8*)ptr), alignedBytes));
413415
ws->initOnceStart = ptr;
414416
}

0 commit comments

Comments
 (0)