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

Re: [Xen-devel] [PATCH v3 11/15] libxl: refactor libxl_get_memory_target



On Thu, 2014-09-04 at 23:43 +0100, Wei Liu wrote:
> +
> +    if (!get_target)
> +        *out_mem = max_memkb;
> +    else
> +        *out_mem = target_memkb;

Given that you are only going to return one or the other why do you go
to all the effort of reading both and converting them from string to int
etc?

Can't you just set the path to read from based on out_target at the top
(and maybe set a const char * what for logging purposes) and then the
rest of the function just deals with that doing a single conversion etc?

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®.