[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/5] xen/domain: Prepare data for is_{pv, hvm}_domain() as early as possible
>>> On 04.09.18 at 14:17, <andrew.cooper3@xxxxxxxxxx> wrote: > On 03/09/18 17:03, Jan Beulich wrote: >>> --- a/xen/common/domain.c >>> +++ b/xen/common/domain.c >>> @@ -272,8 +272,12 @@ struct domain *domain_create(domid_t domid, >>> if ( (d = alloc_domain_struct()) == NULL ) >>> return ERR_PTR(-ENOMEM); >>> >>> + /* Sort out our idea of is_system_domain(). */ >>> d->domain_id = domid; >>> >>> + /* Debug sanity. */ >>> + ASSERT(is_system_domain(d) ? config == NULL : config != NULL); >> Would you mind shortening this to at least >> >> ASSERT(is_system_domain(d) ? !config : config); >> >> while you move it? > > Unfortunately not. > > domain.c: In function ‘domain_create’: > domain.c:296:67: error: pointer/integer type mismatch in conditional > expression [-Werror] > ASSERT(is_system_domain(d) ? !config : config); > ^ > cc1: all warnings being treated as errors > /local/xen.git/xen/Rules.mk:194: recipe for target 'domain.o' failed > > which reminds me why I wrote it the way I did originally. Well, okay then. I suppose ASSERT(is_system_domain(d) ? !config : !!config); or ASSERT(is_system_domain(d) == !config); aren't really acceptable to you. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |