From: Wei Liu Subject: Re: [PATCH V4 15/24] libxl: introduce libxl_cpuid_policy_list_length Date: Tue, 6 May 2014 15:17:35 +0100 Message-ID: <20140506141735.GL17067@zion.uk.xensource.com> References: <1398949101-23320-1-git-send-email-wei.liu2@citrix.com> <1398949101-23320-16-git-send-email-wei.liu2@citrix.com> <1399384308.3014.141.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1399384308.3014.141.camel@kazak.uk.xensource.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: Ian Campbell Cc: ian.jackson@eu.citrix.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, May 06, 2014 at 02:51:48PM +0100, Ian Campbell wrote: [...] > > > > +int libxl_cpuid_policy_list_length(libxl_cpuid_policy_list *l) > > +{ > > + int i = 0; > > + > > + if (*l) > > + while ((*l)[i].input[0] != XEN_CPUID_INPUT_UNUSED) > > Other functions of this type would assign *l to a temporary, I think > this should do the same. The prevalent style would make the parameter > *pl and then l = *pl. > No problem. ;-)