Re: [PATCH net] net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge

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

 



On Tue, Aug 10, 2021 at 10:12:38AM +0100, Russell King - ARM Linux admin wrote:
> There's a difference between:
> 
> 	struct foo bar = { 0 };
> 
> and
> 
> 	struct foo bar = { };
> 
> The former tells the compiler that you wish to set the first member of
> struct foo, which will be an integer type, to zero. The latter is an
> empty initialiser where all members and sub-members of the structure
> default to a zero value.
> 
> You should have no problem with the latter. You will encounter problems
> with the former if the first member of struct foo is not an integer
> type.

Ok, that's good to know. Seeing that this patch has not been applied yet
I'll go for a v2.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux