[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()
On Fri, 2016-02-12 at 16:34 +0530, Harmandeep Kaur wrote: > On Fri, Feb 12, 2016 at 4:30 PM, Dario Faggioli > <dario.faggioli@xxxxxxxxxx> wrote: > >Â > Sorry I actually meant, > tools/libxl/xl_cmdimpl.c:ÂÂÂÂvinfo = libxl_get_version_info(ctx); > > vinfo = libxl_get_version_info(ctx); > ÂÂÂÂif (vinfo) { > Which again checks for vinfo to not be NULL before using it, so this also seems ok to me. > ÂÂÂÂÂÂÂÂi = (1 << 20) / vinfo->pagesize; > ÂÂÂÂÂÂÂÂprintf("total_memoryÂÂÂÂÂÂÂÂÂÂÂ: %"PRIu64"\n", > info.total_pages / i); > ÂÂÂÂÂÂÂÂprintf("free_memoryÂÂÂÂÂÂÂÂÂÂÂÂ: %"PRIu64"\n", > (info.free_pages - info.outstanding_pages) / i); > ÂÂÂÂÂÂÂÂprintf("sharing_freed_memoryÂÂÂ: %"PRIu64"\n", > info.sharing_freed_pages / i); > ÂÂÂÂÂÂÂÂprintf("sharing_used_memoryÂÂÂÂ: %"PRIu64"\n", > info.sharing_used_frames / i); > ÂÂÂÂÂÂÂÂprintf("outstanding_claimsÂÂÂÂÂ: %"PRIu64"\n", > info.outstanding_pages / i); > ÂÂÂÂ} > 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) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |