From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v6 for-4.5 2/5] xl: move 'replace_string' further up the file Date: Thu, 25 Sep 2014 15:06:45 -0400 Message-ID: <20140925190645.GD29663@laptop.dumpdata.com> References: <1411591685-25308-1-git-send-email-dave.scott@citrix.com> <1411591685-25308-3-git-send-email-dave.scott@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XXENT-00039L-Qz for xen-devel@lists.xenproject.org; Thu, 25 Sep 2014 19:06:55 +0000 Content-Disposition: inline In-Reply-To: <1411591685-25308-3-git-send-email-dave.scott@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: David Scott Cc: xen-devel@lists.xenproject.org, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, wei.liu2@citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, Sep 24, 2014 at 09:48:02PM +0100, David Scott wrote: > This allows the function to be reused more easily. Reviewed-by: Konrad Rzeszutek Wilk > > Signed-off-by: David Scott > --- > tools/libxl/xl_cmdimpl.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 698b3bc..1695f74 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -799,6 +799,12 @@ static void parse_vcpu_affinity(libxl_domain_build_info *b_info, > } > } > > +static void replace_string(char **str, const char *val) > +{ > + free(*str); > + *str = strdup(val); > +} > + > static void parse_config_data(const char *config_source, > const char *config_data, > int config_len, > @@ -1914,13 +1920,6 @@ static int match_option_size(const char *prefix, size_t len, > #define MATCH_OPTION(prefix, arg, oparg) \ > match_option_size((prefix "="), sizeof((prefix)), (arg), &(oparg)) > > -static void replace_string(char **str, const char *val) > -{ > - free(*str); > - *str = strdup(val); > -} > - > - > /* Preserve a copy of a domain under a new name. Updates *r_domid */ > static int preserve_domain(uint32_t *r_domid, libxl_event *event, > libxl_domain_config *d_config) > -- > 1.7.10.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel