On Mon, Feb 24, 2020 at 02:22:19PM +0000, Andrew Cooper wrote:
> The macros in xmalloc.h are a mix of using their type parameter directly, and
> using typeof().

The only ones I could spot in the neighborhood are
xrealloc_flex_struct and xmemdup, which don't have a type parameter
but rather a pointer parameter, and hence use typeof against the
passed pointer.

> Switch uniformly to the latter so expressions can be used,
> rather than only type names.

I'm fine with this, but I don't think they are a mix, macros
using a type parameter clearly expect a type, while macros using ptr
expect a pointer, and hence use typeof to get the type.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to