Changeset 73097 in vbox for trunk/src/VBox/ValidationKit/utils/usb
- Timestamp:
- Jul 12, 2018 9:06:33 PM (7 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/usb
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
r69111 r73097 208 208 { 209 209 Assert(pPkt->cb >= sizeof(*pPkt)); 210 pPkt->uCrc32 = RTCrc32(pPkt->achOpcode, pPkt->cb - RT_ OFFSETOF(UTSPKTHDR, achOpcode));210 pPkt->uCrc32 = RTCrc32(pPkt->achOpcode, pPkt->cb - RT_UOFFSETOF(UTSPKTHDR, achOpcode)); 211 211 if (pPkt->cb != RT_ALIGN_32(pPkt->cb, UTSPKT_ALIGNMENT)) 212 212 memset((uint8_t *)pPkt + pPkt->cb, '\0', RT_ALIGN_32(pPkt->cb, UTSPKT_ALIGNMENT) - pPkt->cb); … … 267 267 pPktHdr, pPktHdr->cb, pPktHdr->uCrc32, pPktHdr->achOpcode, RT_MIN(pPktHdr->cb, 256), pPktHdr)); 268 268 uint32_t uCrc32Calc = pPktHdr->uCrc32 != 0 269 ? RTCrc32(&pPktHdr->achOpcode[0], pPktHdr->cb - RT_ OFFSETOF(UTSPKTHDR, achOpcode))269 ? RTCrc32(&pPktHdr->achOpcode[0], pPktHdr->cb - RT_UOFFSETOF(UTSPKTHDR, achOpcode)) 270 270 : 0; 271 271 if (pPktHdr->uCrc32 == uCrc32Calc) -
trunk/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadget.cpp
r69111 r73097 109 109 if (RT_LIKELY(pClassIf)) 110 110 { 111 PUTSGADGETINT pThis = (PUTSGADGETINT)RTMemAllocZ(RT_ OFFSETOF(UTSGADGETINT, abClassInst[pClassIf->cbClass]));111 PUTSGADGETINT pThis = (PUTSGADGETINT)RTMemAllocZ(RT_UOFFSETOF_DYN(UTSGADGETINT, abClassInst[pClassIf->cbClass])); 112 112 if (RT_LIKELY(pThis)) 113 113 { -
trunk/src/VBox/ValidationKit/utils/usb/UsbTestServiceGadgetHost.cpp
r69111 r73097 109 109 if (RT_LIKELY(pIf)) 110 110 { 111 PUTSGADGETHOSTINT pThis = (PUTSGADGETHOSTINT)RTMemAllocZ(RT_ OFFSETOF(UTSGADGETHOSTINT, abIfInst[pIf->cbIf]));111 PUTSGADGETHOSTINT pThis = (PUTSGADGETHOSTINT)RTMemAllocZ(RT_UOFFSETOF_DYN(UTSGADGETHOSTINT, abIfInst[pIf->cbIf])); 112 112 if (RT_LIKELY(pThis)) 113 113 {
Note:
See TracChangeset
for help on using the changeset viewer.