From owner-svn-src-head@freebsd.org Tue Jun 5 20:53:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB951FF62F2 for ; Tue, 5 Jun 2018 20:53:27 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68FCF71CA1 for ; Tue, 5 Jun 2018 20:53:27 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 7d5428ed-6902-11e8-8837-614b7c574d04 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 7d5428ed-6902-11e8-8837-614b7c574d04; Tue, 05 Jun 2018 20:53:25 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w55KrONe038840; Tue, 5 Jun 2018 14:53:24 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1528232004.63685.25.camel@freebsd.org> Subject: Re: svn commit: r334669 - head/sys/sys From: Ian Lepore To: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 05 Jun 2018 14:53:24 -0600 In-Reply-To: <201806052034.w55KYBsb096418@repo.freebsd.org> References: <201806052034.w55KYBsb096418@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 20:53:28 -0000 On Tue, 2018-06-05 at 20:34 +0000, Eric van Gyzen wrote: > Author: vangyzen > Date: Tue Jun  5 20:34:11 2018 > New Revision: 334669 > URL: https://svnweb.freebsd.org/changeset/base/334669 > > Log: >   Make Coverity more happy with r334545 >    >   Coverity complains about: >    >    if (((flags) & M_WAITOK) || _malloc_item != NULL) >    >   saying: >    >    The expression >    1 /* (2 | 0x100) & 2 */ || _malloc_item != NULL >    is suspicious because it performs a Boolean operation >    on a constant other than 0 or 1. >    >   Although the code is correct, add "!= 0" to make it slightly >   more legible and to silence hundreds(?) of Coverity warnings. >    This is a sad sad thing. Treating (bits & flagconstants) as boolean has a long long history in C. Surely there are literally thousand of occurrances in freebsd code already, so why did this one get flagged? -- Ian