svn commit: r345815 - in head: lib/libcam sys/cam sys/cam/nvme

Alexander Motin mav at FreeBSD.org
Wed May 22 15:39:58 UTC 2019


On 22.05.2019 11:10, Alexey Dokuchaev wrote:
> On Tue, Apr 02, 2019 at 07:37:53PM +0000, Alexander Motin wrote:
>> New Revision: 345815
>> URL: https://svnweb.freebsd.org/changeset/base/345815
>>
>> Log:
>>   Make cam_error_print() decode NVMe commands.
>>
>> Modified: head/sys/cam/nvme/nvme_xpt.c
>> ...
>> @@ -769,11 +769,13 @@ nvme_proto_debug_out(union ccb *ccb)
>>  {
>>  	char cdb_str[(sizeof(struct nvme_command) * 3) + 1];
>>  
>> -	if (ccb->ccb_h.func_code != XPT_NVME_IO)
>> +	if (ccb->ccb_h.func_code != XPT_NVME_IO ||
>> +	    ccb->ccb_h.func_code != XPT_NVME_ADMIN)
>>  		return;
> 
> PVS Studio complains that "Expression is always true. Probably the '&&'
> operator should be used here".  Can you take a look?

Fixed. Thank you.

-- 
Alexander Motin


More information about the svn-src-head mailing list