[ovs-dev] [PATCH v10 4/5] dpif-netdev: refactor generic implementation
ian.stokes at intel.com
Fri Jul 12 16:59:26 UTC 2019
> On Fri, Jul 12, 2019 at 04:20:06PM +0000, Van Haaren, Harry wrote:
> > > The sizeof operator is unique among C operators in that it accepts two
> > > very different kinds of operands: an expression or a type. In general,
> > > prefer to specify an expression, e.g. int *x = xmalloc(sizeof *x);.
> > > the operand of sizeof is an expression, there is no need to
> > > that operand, and please don't.
> > Hmmm, I get compile failures here with "sizeof uint64_t" instead of
> > There's also some ambiguity possible, see here:
> > In short, I've left the sizeof() with brackets, as code that compiles
> wins in the end.
> uint64_t is an example of a type rather than an expression. With a
> type, the parentheses are required.
Ah, thanks for clarifying Ben/Ilya.
More information about the dev