From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [OPW PATCH] tools/xl:Making _dispose function simplicity for libxl_dominfo Date: Mon, 27 Oct 2014 10:06:33 +0000 Message-ID: <544E1929.7020300@citrix.com> References: <544d43ba.6667460a.14f6.ffff9715@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <544d43ba.6667460a.14f6.ffff9715@mx.google.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Uma Sharma , Wei.Liu2@citrix.com Cc: George.Dunlap@eu.citrix.com, Ian.Jackson@citrix.com, Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 26/10/14 18:55, Uma Sharma wrote: > This patch simplifies the call to dispose for libxl_dominfo *info. > _dispose was called multiple times in tools/libxl/xl_cmdimpl.c > IDL generated libxl types should be used only after calling the init > function. > > Signed-off-by: Uma Sharma > -- > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 5325a52..9a6ceb3 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -4375,12 +4375,8 @@ int main_list(int argc, char **argv) > list_domains_details(info, nb_domain); > else > list_domains(verbose, context, 0 /* claim */, numa, info, nb_domain); > - > - if (info_free) > - libxl_dominfo_list_free(info, nb_domain); > - else > - libxl_dominfo_dispose(info); > - > + > + libxl_dominfo_list_free(info, nb_domain); Unrelated to the code in the patch, observe from the first - and first + that you have introduced trailing whitespace with this change, which should be avoided. If you can, configure your editor to highlight trailing whitespace. ~Andrew