From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2l9J-00046v-B9 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:09:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2l9D-00028e-2y for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:09:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2l9C-00028N-RE for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:08:55 -0500 Date: Wed, 29 Feb 2012 12:08:42 -0300 From: Luiz Capitulino Message-ID: <20120229120842.6866b559@doriath.home> In-Reply-To: <4F4E3559.3010801@redhat.com> References: <1330522650-15357-1-git-send-email-pbonzini@redhat.com> <1330522650-15357-4-git-send-email-pbonzini@redhat.com> <4F4E3559.3010801@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/6] rename blockdev-group-snapshot-sync List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Stefan Hajnoczi , Jeff Cody , qemu-devel , Federico Simoncelli , Eric Blake On Wed, 29 Feb 2012 15:25:29 +0100 Paolo Bonzini wrote: > Il 29/02/2012 14:37, Paolo Bonzini ha scritto: > > + assert(!(dev_info->snapshot->has_format && format)); > > Oops, this wanted to be > > assert(dev_info->snapshot->has_format == (format != NULL)); > > but it can just be omitted, I wasn't sure of how QAPI handled optionals. Do you now? All optionals will be accompanied of a 'bool has_OPTIONAL_NAME', this bool will be true if the optional has been passed by the caller/client or false otherwise (in which case you shouldn't trust it).