Re: [PATCH] blkzone: Add --force option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 05, 2020 / 09:45, Karel Zak wrote:
> On Fri, Jun 05, 2020 at 02:06:18PM +0900, Shin'ichiro Kawasaki wrote:
> > Also fix missing initialization and too many periods in man page of
> > --verbose option.
>  
> The initialization is not missing :-)
> 
> > @@ -382,12 +387,15 @@ int main(int argc, char **argv)
> >  		.count = 0,
> >  		.length = 0
> >  	};
> > +	ctl.force = 0;
> > +	ctl.verbose = 0;
> 
> This is unnecessary.
> 
> According to C standard all subobjects that are not initialized
> explicitly shall be initialized implicitly the same as objects that
> have static storage duration. (C11 standard, 6.7.8 Initialization).
> 
> For example: 
> 
>  struct A {
>     int x, y, z;
>  };
> 
>  struct A foo = { .x = 0 };
> 
> means that foo.y as well as foo.z are zero.
> 
> You can see this pattern pretty often our code.

Thanks. I misunderstood C language struct initialization. Also I noticed that
you made another commit to reduce confusion. This is helpful :)

> 
> 
> Anyway, your patch has been merged (with tiny changes). Thanks!

Thank you!

-- 
Best Regards,
Shin'ichiro Kawasaki



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux