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

[Xen-changelog] [xen master] libxl: replace memset() with libxl__device_console_init



commit 9991ecd77484f855a7bf90845f37e87f768c74f1
Author:     David Scott <dave.scott@xxxxxxxxxx>
AuthorDate: Thu Oct 9 10:17:26 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Oct 20 13:51:28 2014 +0100

    libxl: replace memset() with libxl__device_console_init
    
    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 <dave.scott@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl_create.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 8ae9701..ca10fac 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");
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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