1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

lz77_compress: change scope of variable 'hash'.

This makes it clearer that it doesn't persist beyond this block, and
would have made it much more obvious that the assignment to it removed
in the previous commit was pointless.
This commit is contained in:
Simon Tatham 2017-02-14 22:13:24 +00:00
parent f2e76e07da
commit ac5b13398f

View File

@ -201,7 +201,7 @@ static void lz77_compress(struct LZ77Context *ctx,
unsigned char *data, int len, int compress)
{
struct LZ77InternalContext *st = ctx->ictx;
int i, hash, distance, off, nmatch, matchlen, advance;
int i, distance, off, nmatch, matchlen, advance;
struct Match defermatch, matches[MAXMATCH];
int deferchr;
@ -242,7 +242,7 @@ static void lz77_compress(struct LZ77Context *ctx,
/*
* Hash the next few characters.
*/
hash = lz77_hash(data);
int hash = lz77_hash(data);
/*
* Look the hash up in the corresponding hash chain and see