use ZSTD_memcpy(), for proper redirection within Linux Kernel

This commit is contained in:
Yann Collet 2021-12-28 17:41:47 -08:00
parent 8da414231d
commit ad7c9fc11e

View File

@ -688,7 +688,7 @@ MEM_STATIC repcodes_t
ZSTD_newRep(U32 const rep[ZSTD_REP_NUM], U32 const offBase_minus1, U32 const ll0) ZSTD_newRep(U32 const rep[ZSTD_REP_NUM], U32 const offBase_minus1, U32 const ll0)
{ {
repcodes_t newReps; repcodes_t newReps;
memcpy(&newReps, rep, sizeof(newReps)); ZSTD_memcpy(&newReps, rep, sizeof(newReps));
ZSTD_updateRep(newReps.rep, offBase_minus1, ll0); ZSTD_updateRep(newReps.rep, offBase_minus1, ll0);
return newReps; return newReps;
} }