From owner-svn-src-head@freebsd.org Sun Nov 17 19:04:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E02BC1C74F4; Sun, 17 Nov 2019 19:04:02 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47GM2B5T7pz4YRB; Sun, 17 Nov 2019 19:04:02 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EFAB1E3FA; Sun, 17 Nov 2019 19:04:02 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAHJ4297014417; Sun, 17 Nov 2019 19:04:02 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAHJ42tn014416; Sun, 17 Nov 2019 19:04:02 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201911171904.xAHJ42tn014416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Sun, 17 Nov 2019 19:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354796 - head/usr.sbin/i2c X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.sbin/i2c X-SVN-Commit-Revision: 354796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Sun, 17 Nov 2019 19:04:03 -0000 Author: arichardson Date: Sun Nov 17 19:04:02 2019 New Revision: 354796 URL: https://svnweb.freebsd.org/changeset/base/354796 Log: Fix error found by new clang operator precendence warning error: operator '?:' has lower precedence than '|'; '|' will be evaluated first I discovered this in CheriBSD after updating our fork of clang to the latest upstream master. Reviewed By: ian Differential Revision: https://reviews.freebsd.org/D22433 Modified: head/usr.sbin/i2c/i2c.c Modified: head/usr.sbin/i2c/i2c.c ============================================================================== --- head/usr.sbin/i2c/i2c.c Sun Nov 17 18:38:37 2019 (r354795) +++ head/usr.sbin/i2c/i2c.c Sun Nov 17 19:04:02 2019 (r354796) @@ -590,7 +590,7 @@ i2c_rdwr_transfer(char *dev, struct options i2c_opt, c * because of the NOSTOP flag used above. */ if (i2c_opt.dir == 'w') - msgs[i].flags = IIC_M_WR | (i > 0) ? IIC_M_NOSTART : 0; + msgs[i].flags = IIC_M_WR | ((i > 0) ? IIC_M_NOSTART : 0); else msgs[i].flags = IIC_M_RD; msgs[i].slave = i2c_opt.addr;