From: Yann Collet Date: Tue, 3 Sep 2024 23:59:06 +0000 (-0700) Subject: more ZSTD_memset() to apply X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f692af18db4c9c6bdac3890d5976e3beb34fb3c;p=thirdparty%2Fzstd.git more ZSTD_memset() to apply --- diff --git a/lib/compress/zstd_preSplit.c b/lib/compress/zstd_preSplit.c index 7d9a32c8f..9c84c2b4a 100644 --- a/lib/compress/zstd_preSplit.c +++ b/lib/compress/zstd_preSplit.c @@ -60,7 +60,7 @@ static void addToFingerprint(FingerPrint* fp, const void* src, size_t s) static void recordFingerprint(FingerPrint* fp, const void* src, size_t s) { - memset(fp, 0, sizeof(*fp)); + ZSTD_memset(fp, 0, sizeof(*fp)); addToFingerprint(fp, src, s); } @@ -108,7 +108,7 @@ static void flushEvents(void) pastEvents.events[n] = newEvents.events[n]; } pastEvents.nbEvents = newEvents.nbEvents; - memset(&newEvents, 0, sizeof(newEvents)); + ZSTD_memset(&newEvents, 0, sizeof(newEvents)); } static void removeEvents(FingerPrint* acc, const FingerPrint* slice) @@ -139,7 +139,7 @@ size_t ZSTD_splitBlock_4k(const void* src, size_t srcSize, size_t blockSizeMax) return pos; } else { mergeEvents(&pastEvents, &newEvents); - memset(&newEvents, 0, sizeof(newEvents)); + ZSTD_memset(&newEvents, 0, sizeof(newEvents)); penalty = penalty - 1 + (penalty == 0); } pos += CHUNKSIZE;