On 7/19/19 10:53 AM, Philippe Mathieu-Daudé wrote: >> if (ret < 0) { >> + memset(reply, 0, sizeof *reply); > > I never had problem with sizeof without parenthesis, but here I find it > not easy to review. Holdover from my work on GNU coding style projects: the rationale is that you can tell 'sizeof(type)' apart from 'sizeof expr' if you always omit the () in the latter case, which further makes it possible to tell at a glance when you are using the expr form (preferred, because the type of the expression can change and the sizeof is still correct) or a type name (harder to audit, since changing a variable's type means you also have to change any associated sizeof in later code using that variable). But I will readily admit qemu is not GNU style: $ git grep 'sizeof ' | wc 394 2500 29756 $ git grep 'sizeof(' | wc 8899 46172 671537 so I've fixed it to use (). > > Anyhow, this definitively looks like 4.1 material. > > Preferently with sizeof(), but I don't mind, so: > Reviewed-by: Philippe Mathieu-Daudé Thanks. Queued on my NBD tree for -rc2. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org