From: Yann Collet Date: Tue, 3 Sep 2024 23:48:52 +0000 (-0700) Subject: do not use `new` as variable name X-Git-Tag: v1.5.7^2~71^2~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=586ca96fec794cde09f4aa01fe792a9779b62368;p=thirdparty%2Fzstd.git do not use `new` as variable name --- diff --git a/lib/compress/zstd_preSplit.c b/lib/compress/zstd_preSplit.c index f2319986c..bba348927 100644 --- a/lib/compress/zstd_preSplit.c +++ b/lib/compress/zstd_preSplit.c @@ -76,25 +76,25 @@ static S64 fpDistance(const FingerPrint *fp1, const FingerPrint *fp2) { // Compare newEvents with pastEvents // return 1 when considered "too different" static int compareFingerprints(const FingerPrint* ref, - const FingerPrint* new, + const FingerPrint* newfp, int penalty) { if (ref->nbEvents <= BLOCKSIZE_MIN) return 0; - { S64 p50 = ref->nbEvents * new->nbEvents; - S64 deviation = fpDistance(ref, new); + { S64 p50 = ref->nbEvents * newfp->nbEvents; + S64 deviation = fpDistance(ref, newfp); S64 threshold = p50 * (THRESHOLD_BASE + penalty) / THRESHOLD_PENALTY_RATE; return deviation >= threshold; } } -static void mergeEvents(FingerPrint* acc, const FingerPrint* new) +static void mergeEvents(FingerPrint* acc, const FingerPrint* newfp) { size_t n; for (n = 0; n < HASHTABLESIZE; n++) { - acc->events[n] += new->events[n]; + acc->events[n] += newfp->events[n]; } - acc->nbEvents += new->nbEvents; + acc->nbEvents += newfp->nbEvents; } static void flushEvents(void)