mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Replace all 'sizeof(x)/sizeof(*x)' with lenof.
I noticed a few of these in the course of preparing the previous commit. I must have been writing that idiom out by hand for _ages_ before it became totally habitual to #define it as 'lenof' in every codebase I touch. Now I've gone through and replaced all the old verbosity with nice terse lenofs.
This commit is contained in:
@ -140,7 +140,7 @@ static void random_stir(void)
|
||||
* digest.
|
||||
*/
|
||||
|
||||
for (k = 0; k < sizeof(digest) / sizeof(*digest); k++)
|
||||
for (k = 0; k < lenof(digest); k++)
|
||||
digest[k] ^= ((uint32_t *) (pool.pool + j))[k];
|
||||
|
||||
/*
|
||||
@ -153,7 +153,7 @@ static void random_stir(void)
|
||||
* Stick the result back into the pool.
|
||||
*/
|
||||
|
||||
for (k = 0; k < sizeof(digest) / sizeof(*digest); k++)
|
||||
for (k = 0; k < lenof(digest); k++)
|
||||
((uint32_t *) (pool.pool + j))[k] = digest[k];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user