On Fri, 2015-08-28 at 12:20 -0700, Joe Perches wrote: > I don't read it as particularly different. > > There are > 100 uses of the not quite a memset initialization > style using "= { <0,> }" in net/ > > $ git grep -E "=\s*\{\s*0?\s*,?\s*\}" net | wc -l > 138 > > There is a difference though if a struct is copied to > user-space as a {} initialization only guarantees that > struct members are initialized to 0 where memset also > zeros any alignment padding.
We do not bother for small struct. Here, the array is big enough that David prefers having an explicit memset() so that it clearly shows that author of this code was aware of this. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html