Richard W.M. Jones wrote:
Subject: [PATCH 03/13] hivex: Collect more statistics about
registries.
This looks fine. Mostly mechanical, like s/h->var/var/,
...
- filename, off, h->pages);
+ filename, off, pages);
...
with type adjustments
- int32_t seg_len;
+ size_t seg_len;
However, I find the following hard to read:
The variables declared after the comma are too easy to miss.
+ /* Collect some stats. */
+ size_t pages = 0; /* Number of hbin pages read. */
+ size_t smallest_page = SIZE_MAX, largest_page = 0;
+ size_t blocks = 0; /* Total number of blocks found. */
+ size_t smallest_block = SIZE_MAX, largest_block = 0, blocks_bytes = 0;
+ size_t used_blocks = 0; /* Total number of used blocks found. */
+ size_t used_size = 0; /* Total size (bytes) of used blocks. */
Maybe it's just that I'm too used to never doing that,
especially with initializers.
ACK