Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2019 15:42:34 +0000
From:      Alexey Dokuchaev <danfe@freebsd.org>
To:        Alexander Motin <mav@freebsd.org>
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>
In-Reply-To: <8fdc1e42-b8aa-3af1-27b3-f78c3918e7ea@FreeBSD.org>
References:  <201612241742.uBOHgYQp045291@repo.freebsd.org> <20190522152124.GA36423@FreeBSD.org> <8fdc1e42-b8aa-3af1-27b3-f78c3918e7ea@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190522154234.GA55867>