From: Wei Liu Subject: Re: [PATCH v7 for-4.5 1/7] libxl: replace memset() with libxl__device_console_init Date: Thu, 9 Oct 2014 10:22:27 +0100 Message-ID: <20141009092227.GB17263@zion.uk.xensource.com> References: <1412846252-25629-1-git-send-email-dave.scott@citrix.com> <1412846252-25629-2-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xc9vd-0006Bc-Pm for xen-devel@lists.xenproject.org; Thu, 09 Oct 2014 09:22:33 +0000 Content-Disposition: inline In-Reply-To: <1412846252-25629-2-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, ian.campbell@citrix.com, ian.jackson@eu.citrix.com, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, Oct 09, 2014 at 10:17:26AM +0100, David Scott wrote: > The current implementation of libxl__device_console_init does the same > memset() so this is identical for now. > > If libxl__device_console_init changes in future (e.g. to prefer a non-zero > default value for some field) then this will continue to work. > > Signed-off-by: David Scott Acked-by: Wei Liu > --- > tools/libxl/libxl_create.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > index 8b82584..543c1b3 100644 > --- a/tools/libxl/libxl_create.c > +++ b/tools/libxl/libxl_create.c > @@ -389,7 +389,7 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, > > static int init_console_info(libxl__device_console *console, int dev_num) > { > - memset(console, 0x00, sizeof(libxl__device_console)); > + libxl__device_console_init(console); > console->devid = dev_num; > console->consback = LIBXL__CONSOLE_BACKEND_XENCONSOLED; > console->output = strdup("pty"); > -- > 1.7.10.4