[sheepdog] [PATCH v5 15/16] collie: implement "collie cluster snapshot" subcommand

Kai Zhang kyle at zelin.io
Tue May 21 05:43:42 CEST 2013


On May 21, 2013, at 3:05 AM, MORITA Kazutaka <morita.kazutaka at gmail.com> wrote:

>> +static void print_list(void *buf, unsigned len)
>> +{
>> +	struct snap_log *log_buf = (struct snap_log *)buf;
>> +	unsigned nr = len / sizeof(struct snap_log), i;
>> +
>> +	printf("Index\t\tTag\t\tSnapshot Time\n");
>> +	for (i = 0; i < nr; i++, log_buf++) {
> 
> I prefer
> 
>  for (int i = 0; i < nr; i++, log_buf++) {
> 
> to make the scope of the variable narrower.
> 

Thanks for catching this.
I will fix it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20130521/dd6784e2/attachment-0004.html>


More information about the sheepdog mailing list