Use struct instead of pointer to the struct as sizeof argument in memset in usbmsc.c
Otherwise it leads to error: argument to 'sizeof' in 'memset' call is the same pointer type 'struct usbmsc_lun_s *' as the destination
This commit is contained in:
parent
64e3dc5e8b
commit
794ecbfd86
1 changed files with 2 additions and 2 deletions
|
|
@ -906,7 +906,7 @@ static void usbmsc_lununinitialize(struct usbmsc_lun_s *lun)
|
|||
(void)close_blockdriver(lun->inode);
|
||||
}
|
||||
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s *));
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -1492,7 +1492,7 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath,
|
|||
|
||||
/* Initialize the LUN structure */
|
||||
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s *));
|
||||
memset(lun, 0, sizeof(struct usbmsc_lun_s));
|
||||
|
||||
/* Allocate an I/O buffer big enough to hold one hardware sector. SCSI commands
|
||||
* are processed one at a time so all LUNs may share a single I/O buffer. The
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue