[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro
On Thu, Jun 14, 2018 at 9:33 PM, Philippe Mathieu-Daudé <f4bug@xxxxxxxxx> wrote: > On 06/14/2018 04:17 PM, John Snow wrote: >> On 06/14/2018 12:44 PM, Stefan Hajnoczi wrote: >>> Determining the size of a field is useful when you don't have a struct >>> variable handy. Open-coding this is ugly. >>> >>> This patch adds the sizeof_field() macro, which is similar to >>> typeof_field(). Existing instances are updated to use the macro. >>> >>> Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx> >> >> How'd you find all the existing instances? > > This works: > > $ git grep -E 'sizeof.*)0)->' Yes, I used a similar grep command-line. I also checked for "sizeof.*)NULL" but nothing uses that syntax. Stefan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |