From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3n4k-0000ir-Jf for qemu-devel@nongnu.org; Tue, 21 Aug 2012 07:56:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3n4e-0006Tl-01 for qemu-devel@nongnu.org; Tue, 21 Aug 2012 07:56:50 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:52094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3n4d-0006Th-S7 for qemu-devel@nongnu.org; Tue, 21 Aug 2012 07:56:43 -0400 Received: by yhpp34 with SMTP id p34so5643828yhp.4 for ; Tue, 21 Aug 2012 04:56:43 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50337776.5000308@redhat.com> Date: Tue, 21 Aug 2012 13:56:38 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-ga: report success-response field in guest-info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik Cc: qemu-devel@nongnu.org Il 21/08/2012 12:25, Michal Privoznik ha scritto: > +bool qmp_command_reports_success(const char *name) { > + QmpCommand *cmd; > + > + QTAILQ_FOREACH(cmd, &qmp_commands, node) { > + if (strcmp(cmd->name, name) == 0) { > + return cmd->options ^ QCO_NO_SUCCESS_RESP; Clever... but please use (a & b) == 0 instead... Paolo > + } > + } > + > + return true; > +} > +