On Thu, Jun 14, 2018 at 9:33 PM, Philippe Mathieu-Daudé <f4...@amsat.org> 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 <stefa...@redhat.com> >> >> 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@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel