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

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

 



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.


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

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com




[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