diff options
Diffstat (limited to 'src/dev')
-rw-r--r-- | src/dev/arm/ufs_device.cc | 2 | ||||
-rw-r--r-- | src/dev/arm/ufs_device.hh | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/dev/arm/ufs_device.cc b/src/dev/arm/ufs_device.cc index cd1bbcafb..137ad8c27 100644 --- a/src/dev/arm/ufs_device.cc +++ b/src/dev/arm/ufs_device.cc @@ -161,7 +161,7 @@ struct UFSHostDevice::SCSIReply UFSHostDevice::UFSSCSIDevice::SCSICMDHandle(uint32_t* SCSI_msg) { struct SCSIReply scsi_out; - memset(&scsi_out, 0, sizeof(struct SCSIReply)); + scsi_out.reset(); /** * Create the standard SCSI reponse information diff --git a/src/dev/arm/ufs_device.hh b/src/dev/arm/ufs_device.hh index 69abc2741..97b9693ce 100644 --- a/src/dev/arm/ufs_device.hh +++ b/src/dev/arm/ufs_device.hh @@ -373,6 +373,10 @@ class UFSHostDevice : public DmaDevice * build a SCSI reply. */ struct SCSIReply { + void reset() { + memset(static_cast<void*>(this), 0, sizeof(*this)); + } + uint8_t status; uint32_t msgSize; uint8_t LUN; |