qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy.
Date: Mon, 30 Aug 2010 17:42:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 08/30/2010 05:35 PM, address@hidden wrote:
-    JSONParsingState state = {};
+    JSONParsingState state;

+    memset(&state, 0, sizeof(state));
      state.ap = ap;


   JSONParsingState state = { .ap = ap };

achieves the same.

Paolo



reply via email to

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