|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.5 v2 2/2] tools/[lib]xl: Fix `xl vcpu-list` when domains without vcpus exist
On Tue, Oct 21, 2014 at 02:08:37PM +0100, Andrew Cooper wrote:
[...]
> >> GC_FREE;
> >> return NULL;
> >> }
> >> - *nr_cpus_out = libxl_get_max_cpus(ctx);
> >> +
> >> + if (domaininfo.max_vcpu_id == XEN_INVALID_MAX_VCPU_ID) {
> >> + *nr_cpus_out = 0;
> > Do you not need to set nr_vcpus_out to 0 as well?
>
> Hmm - probably not. NULL should do.
>
Just setting one out parameter not the other looks a bit odd to me.
Nothing fundamental wrong with that though, as you said, it's mostly the
NULL return value indicates failure.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |