qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/8] json-parser: fix two coverity defects


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 3/8] json-parser: fix two coverity defects
Date: Tue, 27 May 2014 15:35:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 27/05/2014 03:40, address@hidden ha scritto:
t *ctxt, va_list *ap)
         }
         token = NULL;
     } else {
-        token = parser_context_pop_token(ctxt);
-        token = NULL;
+        (void)parser_context_pop_token(ctxt);
     }

     return QOBJECT(dict);
@@ -542,8 +541,7 @@ static QObject *parse_array(JSONParserContext *ctxt, 
va_list *ap)

         token = NULL;
     } else {
-        token = parser_context_pop_token(ctxt);
-        token = NULL;
+        (void)parser_context_pop_token(ctxt);
     }

     return QOBJECT(list);

You used to have 2 dead stores, now you have 4. :) Please remove all the token = NULL assignments.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]