From owner-svn-src-head@freebsd.org Wed May 22 15:42:35 2019 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 ED62F15AF02F; Wed, 22 May 2019 15:42:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D57F8B8C7; Wed, 22 May 2019 15:42:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 794B016F7C; Wed, 22 May 2019 15:42:34 +0000 (UTC) Date: Wed, 22 May 2019 15:42:34 +0000 From: Alexey Dokuchaev To: Alexander Motin Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r310524 - in head/sys/cam: ctl scsi Message-ID: <20190522154234.GA55867@FreeBSD.org> References: <201612241742.uBOHgYQp045291@repo.freebsd.org> <20190522152124.GA36423@FreeBSD.org> <8fdc1e42-b8aa-3af1-27b3-f78c3918e7ea@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8fdc1e42-b8aa-3af1-27b3-f78c3918e7ea@FreeBSD.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 8D57F8B8C7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.91)[-0.905,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Wed, 22 May 2019 15:42:35 -0000 On Wed, May 22, 2019 at 11:40:42AM -0400, Alexander Motin wrote: > On 22.05.2019 11:21, Alexey Dokuchaev wrote: > > On Sat, Dec 24, 2016 at 05:42:34PM +0000, Alexander Motin wrote: > >> New Revision: 310524 > >> URL: https://svnweb.freebsd.org/changeset/base/310524 > >> > >> Modified: head/sys/cam/scsi/scsi_all.c > >> ... > >> + } > >> + if (len > sizeof(sense->cmd_spec_info)) { > >> + data += len - sizeof(sense->cmd_spec_info); > >> + len -= len - sizeof(sense->cmd_spec_info); > > > > PVS Studio complains here: error: V765 A compound assignment expression 'x > > -= x - ...' is suspicious. Consider inspecting it for a possible error. > > > > This "len -= len - sizeof(...)" indeed looks weird, can you take a look? > > It may be weird, but not incorrect. Fixed though. Wow that was fast! Thanks (for both commits), ./danfe