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

[Xen-changelog] [xen master] tools: libxl: testidl: initialise the KeyedUnion keyvar before the union



commit fba6c4ba5e8563d7ce53750750ac273781bd9398
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Wed Dec 4 17:48:56 2013 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Dec 5 09:25:35 2013 +0000

    tools: libxl: testidl: initialise the KeyedUnion keyvar before the union
    
    This is Coverity CID 1135378 and 1135379.
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/libxl/gentest.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/gentest.py b/tools/libxl/gentest.py
index 6fab493..722b7f4 100644
--- a/tools/libxl/gentest.py
+++ b/tools/libxl/gentest.py
@@ -42,6 +42,7 @@ def gen_rand_init(ty, v, indent = "    ", parent = None):
     elif isinstance(ty, idl.KeyedUnion):
         if parent is None:
             raise Exception("KeyedUnion type must have a parent")
+        s += gen_rand_init(ty.keyvar.type, parent + ty.keyvar.name, indent, 
parent)
         s += "switch (%s) {\n" % (parent + ty.keyvar.name)
         for f in ty.fields:
             (nparent,fexpr) = ty.member(v, f, parent is None)
--
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®.