On 01/31/14 10:29, Hannes Reinecke wrote:
> -     len = (h->buff[2] << 8) + h->buff[3] + 4;
> -     if (len > h->bufflen) {
> +     len = (buff[2] << 8) + buff[3] + 4;
> +     if (len > bufflen) {

I think this code will become easier to read when using
get_unaligned_be16() for extracting the length from the VPD response.

Bart.

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

Reply via email to