[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 3/5] xl: allow for node-wise specification of vcpu pinning



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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.