From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1/5] libxl: tidy libxl_get_scheduler() according to CODING_STYLE Date: Tue, 5 Jan 2016 09:20:30 +0100 Message-ID: <1451982030.27063.30.camel@citrix.com> References: <1450091323.16856.24.camel@citrix.com> <1451279808-25264-1-git-send-email-jtotto@uwaterloo.ca> <1451279808-25264-2-git-send-email-jtotto@uwaterloo.ca> <1451924627.13361.178.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2688131961212731495==" Return-path: In-Reply-To: <1451924627.13361.178.camel@citrix.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 , Joshua Otto , xen-devel@lists.xen.org, Ian Jackson Cc: george.dunlap@eu.citrix.com, wei.liu2@citrix.com, hjarmstr@uwaterloo.ca, czylin@uwaterloo.ca, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org --===============2688131961212731495== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-AYpnY2co3xha8DPXjKGI" --=-AYpnY2co3xha8DPXjKGI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2016-01-04 at 16:23 +0000, Ian Campbell wrote: > On Mon, 2015-12-28 at 00:16 -0500, Joshua Otto wrote: > >=C2=A0 > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > > @@ -5585,10 +5585,11 @@ out: > > =C2=A0 > > =C2=A0libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx) > > =C2=A0{ > > -=C2=A0=C2=A0=C2=A0=C2=A0libxl_scheduler sched, ret; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0GC_INIT(ctx); > > -=C2=A0=C2=A0=C2=A0=C2=A0if ((ret =3D xc_sched_id(ctx->xch, (int *)&sch= ed)) !=3D 0) { > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0LOGE(ERROR, "getting d= omain info list"); > > +=C2=A0=C2=A0=C2=A0=C2=A0libxl_scheduler sched; > > +=C2=A0=C2=A0=C2=A0=C2=A0int r =3D xc_sched_id(ctx->xch, (int *)&sched)= ; >=C2=A0 > Safer (and cleaner looking even if I'm wrong) would be to use a > temporary > int for the function call and turn it into an enum implicitly in the > return. >=20 FWIW, +1 to this Regadrs, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-AYpnY2co3xha8DPXjKGI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlaLfM4ACgkQk4XaBE3IOsTuoACdEgjwf91A5raymHViRuvJBvzi Wa4An0lbs/FZzeBzj+HpquAs25NsoZsV =/PfY -----END PGP SIGNATURE----- --=-AYpnY2co3xha8DPXjKGI-- --===============2688131961212731495== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============2688131961212731495==--