From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGnrn-0006J9-7Q for qemu-devel@nongnu.org; Fri, 21 Feb 2014 06:02:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGnrh-0001Bc-83 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 06:02:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGnrg-0001BP-VX for qemu-devel@nongnu.org; Fri, 21 Feb 2014 06:01:57 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1LB1t3Q031169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Feb 2014 06:01:56 -0500 Date: Fri, 21 Feb 2014 12:01:52 +0100 From: Kevin Wolf Message-ID: <20140221110152.GA3346@dhcp-200-207.str.redhat.com> References: <1391090848-2115-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1391090848-2115-1-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com Am 30.01.2014 um 15:07 hat Markus Armbruster geschrieben: > error_is_set(&var) is the same as var != NULL, but it takes > whole-program analysis to figure that out. Unnecessarily hard for > optimizers, static checkers, and human readers. Dumb it down to > obvious. > > Gets rid of several dozen Coverity false positives. > > Note that the obvious form is already used in many places. > > Signed-off-by: Markus Armbruster > --- > block.c | 16 +++++++-------- > block/blkdebug.c | 4 ++-- > block/blkverify.c | 2 +- > block/curl.c | 2 +- > block/gluster.c | 2 +- > block/iscsi.c | 2 +- > block/nbd.c | 2 +- > block/qapi.c | 4 ++-- > block/qcow2.c | 6 +++--- > block/raw-posix.c | 12 +++++------ > block/raw-win32.c | 4 ++-- > block/raw_bsd.c | 2 +- > block/rbd.c | 2 +- > block/sheepdog.c | 2 +- > block/snapshot.c | 2 +- > block/vvfat.c | 2 +- > blockdev.c | 42 +++++++++++++++++++------------------- > blockjob.c | 4 ++-- In the future, can you pleas take readability shit that causes conflicts left and right through the appropriate subtree so that the burden of fixing up things isn't on the maintainers? The above files have _nothing_ to do with QMP. Had I seen this in time before it was pulled, I would have nacked it for going through (and therefore being based on) the wrong tree. Kevin > hmp.c | 8 ++++---- > hw/pci/pci-hotplug-old.c | 4 ++-- > hw/usb/dev-network.c | 2 +- > net/net.c | 12 +++++------ > qdev-monitor.c | 2 +- > qemu-char.c | 6 +++--- > qemu-img.c | 8 ++++---- > qga/commands-posix.c | 18 ++++++++-------- > qga/commands-win32.c | 2 +- > savevm.c | 4 ++-- > tests/test-qmp-input-strict.c | 16 +++++++-------- > tests/test-qmp-input-visitor.c | 20 +++++++++--------- > tests/test-qmp-output-visitor.c | 22 ++++++++++---------- > tests/test-string-input-visitor.c | 20 +++++++++--------- > tests/test-string-output-visitor.c | 14 ++++++------- > tpm.c | 2 +- > util/qemu-config.c | 16 +++++++-------- > util/qemu-option.c | 22 ++++++++++---------- > vl.c | 2 +- > 37 files changed, 156 insertions(+), 156 deletions(-)