From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqeMB-0001Dd-LP for qemu-devel@nongnu.org; Tue, 18 Nov 2014 03:41:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqeM5-0000AT-6A for qemu-devel@nongnu.org; Tue, 18 Nov 2014 03:41:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqeM4-0000AM-Uv for qemu-devel@nongnu.org; Tue, 18 Nov 2014 03:41:45 -0500 Date: Tue, 18 Nov 2014 14:11:39 +0530 From: Amit Shah Message-ID: <20141118084139.GA9190@grmbl.mre> References: <20141117171503.13080.40393.malonedeb@soybean.canonical.com> <20141117171503.13080.40393.malonedeb@soybean.canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141117171503.13080.40393.malonedeb@soybean.canonical.com> Subject: Re: [Qemu-devel] [Bug 1393486] [NEW] hw/virtio/virtio-rng.c:150: bad test ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dcb <1393486@bugs.launchpad.net> Cc: qemu-devel@nongnu.org On (Mon) 17 Nov 2014 [17:15:03], dcb wrote: > Public bug reported: > > hw/virtio/virtio-rng.c:150:31: warning: logical not is only applied to > the left hand side of comparison [-Wlogical-not-parentheses] > > if (!vrng->conf.period_ms > 0) { > error_setg(errp, "'period' parameter expects a positive integer"); > return; > } > > Maybe better code > > if (vrng->conf.period_ms <= 0) { > error_setg(errp, "'period' parameter expects a positive integer"); > return; > } Thanks! Do you want to submit a patch, since you've identified the fix as well? Amit