From: Ian Jackson Subject: Re: [PATCH v2 3/5] xl: allow for node-wise specification of vcpu pinning Date: Fri, 6 Sep 2013 17:38:16 +0100 Message-ID: <21034.1272.405345.870600@mariner.uk.xensource.com> References: <20130906154725.10218.45008.stgit@hit-nxdomain.opendns.com> <20130906155540.10218.3642.stgit@hit-nxdomain.opendns.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130906155540.10218.3642.stgit@hit-nxdomain.opendns.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: Dario Faggioli Cc: George Dunlap , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Dario Faggioli writes ("[PATCH v2 3/5] xl: allow for node-wise specification of vcpu pinning"): > Making it possible to use something like the following: ... Oh, and: > +static int update_cpumap_range(const char *str, libxl_bitmap *cpumap) > +{ > + unsigned long ida, idb; > + libxl_bitmap node_cpumap; > + bool is_not = false, is_nodes = false; > + int rc = 0; > + > + libxl_bitmap_init(&node_cpumap); > + > + rc = libxl_node_bitmap_alloc(ctx, &node_cpumap, 0); > + if (rc) { > + fprintf(stderr, "libxl_node_bitmap_alloc failed.\n"); > + return rc; This could be "goto out". I think that's clearer. It follows the "zero everything right at the top, and use `goto out' for every premature exit" pattern. Thanks, Ian.