On Thu, Dec 19, 2002 at 04:25:40PM -0800, Nate Lawson wrote:

>                 if (csio->ccb_h.flags & CAM_CDB_POINTER) {
>                         cmd = (unsigned char *) csio->cdb_io.cdb_ptr;
>                 } else {
>                         cmd = (unsigned char *) &csio->cdb_io.cdb_bytes;
>                 }
> 
> The & is extraneous.  Not sure why this doesn't bomb horribly later.

Because cdb_bytes is an array not a pointer.  The expression
&csio->cdb_io.cdb_bytes points to the whole array and has the type
u_int8_t (*)[IOCDBLEN], when cast to unsigned char *, the value will be
the same as just csio->cdb_io.cdb_bytes.

Regards,
Stefan Farfeleder

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to