[Libguestfs] [PATCH 3/13] hivex: Collect more statistics about registries.
Richard W.M. Jones
rjones at redhat.com
Thu Jan 28 11:26:54 UTC 2010
On Thu, Jan 28, 2010 at 12:21:11PM +0100, Jim Meyering wrote:
> 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.
Yes I agree they are a bit hard to see.
> ACK
Thanks - I've now pushed 1 & 3.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list