On Fri, 2016-10-21 at 18:17 +0100, Wei Liu wrote: > Clang complains nr_dom_vcpus may be used uninitialized after > 4a6070ea9. > > The real issue is vinfo can be NULL and nr_dom_vcpus remains > uninitialized if previous call fails. > If it were me doing this, I'd just have initialized nr_dom_vcpus to 0.
This is what I've always done when using libxl_numainfo_list_free(), which is similar to this (then how did I miss doing it here? Oh, well... :-/) And since we're initializing vinfo to NULL already, initializing nr_dom_vcpus as well makes things look more uniform. That being said, this amounts to personal taste, you're the maintainer, and it's not that I can't stand this solution, so: > Signed-off-by: Wei Liu <wei.l...@citrix.com> > Reviewed-by: Dario Faggioli <dario.faggi...@citrix.com> Thanks and Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel