VirtualBox

Changeset 81661 in vbox


Ignore:
Timestamp:
Nov 4, 2019 9:50:26 PM (5 years ago)
Author:
vboxsync
Message:

Virtio_1_0,DevVirtioScsi: More common virtio code cleanups. bugref:9218 bugref:9440

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VirtIO/Virtio_1_0.cpp

    r81660 r81661  
    973973        uint32_t offIntra = offCfg - RT_OFFSETOF(VIRTIO_PCI_COMMON_CFG_T, member); \
    974974        if (fWrite) \
    975             memcpy(((char *)(pVirtio->member + idx)) + offIntra, (const char *)pv, cb); \
     975            memcpy((char *)&pVirtio->member[idx] + offIntra, pv, cb); \
    976976        else \
    977             memcpy((char *)pv, (const char *)(((char *)(pVirtio->member + idx)) + offIntra), cb); \
     977            memcpy(pv, (const char *)&pVirtio->member[idx] + offIntra, cb); \
    978978        LOG_COMMON_CFG_ACCESS_INDEXED(member, idx, offIntra); \
    979979    } while(0)
     
    987987        else \
    988988        { \
    989             memcpy((char *)pv, (const char *)(((char *)&pVirtio->member) + offIntra), cb); \
     989            memcpy(pv, (const char *)&pVirtio->member + offIntra, cb); \
    990990            LOG_COMMON_CFG_ACCESS(member, offIntra); \
    991991        } \
     
    10001000        else \
    10011001        { \
    1002             memcpy((char *)pv, ((char *)(pVirtio->member + idx)) + offIntra, cb); \
     1002            memcpy(pv, (char const *)&pVirtio->member[idx] + offIntra, cb); \
    10031003            LOG_COMMON_CFG_ACCESS_INDEXED(member, idx, offIntra); \
    10041004        } \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette