Subject: Re: sys/dev/scsipi/scsipi_base.c
To: None <current-users@netbsd.org>
From: Elad Efrat <elad@NetBSD.org>
List: current-users
Date: 01/06/2008 12:56:29
David Laight wrote:
> On Sun, Jan 06, 2008 at 03:41:49AM -0700, John R. Shannon wrote:
>> Line 1124 has:
>>
>> memcpy(inqbuf->vendor, "ADAPTEC ACB-4000 ", 28);
>>
>> and line 1144 has:
>>
>> memcpy(inqbuf->vendor, "EMULEX MT-02 QIC ", 28);
>>
>> yet inqbuf->vendor is declared in struct scsipi_inquiry_data as:
>>
>> char vendor[8];
>
> and is followed by:
> char product[16];
> char revision[4];
> so the memcpy updates all 3 fields :-)
Is there a reason for this?
-e.