From a0f26eb2c2a866713484aa670770e44c06250ecd Mon Sep 17 00:00:00 2001 From: justin1014 Date: Fri, 27 Sep 2002 03:30:00 +0000 Subject: [PATCH] 6 bytes or so saved in bzip2 git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1202 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/bzip2/bzlib_private.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/bzip2/bzlib_private.h b/Source/bzip2/bzlib_private.h index 97ff1d79..9290601c 100644 --- a/Source/bzip2/bzlib_private.h +++ b/Source/bzip2/bzlib_private.h @@ -129,19 +129,17 @@ extern Int16 BZ2_rNums[513]; #define BZ_RAND_DECLS \ Int32 rNToGo; \ - Int32 rTPos \ + Int32 rTPos #define BZ_RAND_INIT_MASK \ - s->rNToGo = 0; \ - s->rTPos = 0 \ + s->rNToGo = s->rTPos = 0 -#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0) +#define BZ_RAND_MASK (!(s->rNToGo-1)) #define BZ_RAND_UPD_MASK \ if (s->rNToGo == 0) { \ s->rNToGo = BZ2_rNums[s->rTPos]; \ - s->rTPos++; \ - if (s->rTPos == 512) s->rTPos = 0; \ + if (++s->rTPos == 512) s->rTPos = 0; \ } \ s->rNToGo--;