[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/xmalloc Unify type handling in macros

On 24.02.2020 15:22, Andrew Cooper wrote:
> The macros in xmalloc.h are a mix of using their type parameter directly, and
> using typeof().  Switch uniformly to the latter so expressions can be used,
> rather than only type names.

As Roger says, there's a reason for the split. And as a result
of this I'm having trouble seeing how this change is going to
be useful. How is a use of these going to look like?

void test(void)
    struct s *ps;

    ps = xmalloc(*ps);

is giving the appearance of a deref (not even just a use) of
an uninitialized variable.

Having seen also your reply to Roger, I think without any
mention of what use this is going to be the takeaway from this
is rather "let's not do this".

I'm sorry, this is unlikely to be what you'd like to hear back,

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.