linux-4.8-rc1/drivers/scsi/sd.c:317: pointless test ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

linux-4.8-rc1/drivers/scsi/sd.c:317]: (style) Unsigned variable 'val'
can't be negative so it is unnecessary to test it.

Source code is

    if (val >= 0 && val <= SD_DIF_TYPE3_PROTECTION)

but

   unsigned int val;

Suggest new code

    if (val <= SD_DIF_TYPE3_PROTECTION)

Regards

David Binderman
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux