[Spice-commits] python_modules/demarshal.py

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Jul 26 09:16:49 UTC 2016


 python_modules/demarshal.py |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 22f8dd18f0ee2fd4343a1f38aa1d2e65bf5985cc
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Mon Jul 25 18:40:35 2016 +0200

    codegen: Do not generate extra null check
    
    Spotted by coverity
    
    Acked-by: Fabiano FidĂȘncio <fidencio at redhat.com>

diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
index 2252f37..de2ccd0 100644
--- a/python_modules/demarshal.py
+++ b/python_modules/demarshal.py
@@ -1098,8 +1098,7 @@ def write_msg_parser(writer, message):
     writer.newline()
     if writer.has_error_check:
         writer.label("error")
-        with writer.block("if (data != NULL)"):
-            writer.statement("free(data)")
+        writer.statement("free(data)")
         writer.statement("return NULL")
     writer.end_block()
 


More information about the Spice-commits mailing list