VirtualBox

Ignore:
Timestamp:
Jul 12, 2013 12:48:17 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
87211
Message:

Main: RT_ZERO() / RTStrCopy()

Location:
trunk/src/VBox/Main/src-server/freebsd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp

    r44529 r47117  
    173173        struct dev_match_result *paMatches = NULL;
    174174
    175         memset(&DeviceCCB, 0, sizeof(union ccb));
    176         memset(&DeviceMatchPattern, 0, sizeof(struct device_match_pattern));
     175        RT_ZERO(DeviceCCB);
     176        RT_ZERO(DeviceMatchPattern);
    177177
    178178        /* We want to get all devices. */
     
    237237                        unsigned iPeriphMatch = 0;
    238238
    239                         memset(&PeriphCCB, 0, sizeof(union ccb));
    240                         memset(&PeriphMatchPattern, 0, sizeof(struct dev_match_pattern));
    241                         memset(aPeriphMatches, 0, sizeof(aPeriphMatches));
     239                        RT_ZERO(PeriphCCB);
     240                        RT_ZERO(PeriphMatchPattern);
     241                        RT_ZERO(aPeriphMatches);
    242242
    243243                        /* This time we only want the specific nodes for the device. */
  • trunk/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp

    r44742 r47117  
    272272        {
    273273            struct ifreq IfReq;
    274             strcpy(IfReq.ifr_name, pNew->szShortName);
     274            RTStrCopy(IfReq.ifr_name, sizeof(IfReq.ifr_name), pNew->szShortName);
    275275            if (ioctl(sock, SIOCGIFFLAGS, &IfReq) < 0)
    276276            {
     
    389389
    390390            struct ifreq IfReq;
    391             strcpy(IfReq.ifr_name, pInfo->szShortName);
     391            RTSTrCopy(IfReq.ifr_name, sizeof(IfReq.ifr_name), pInfo->szShortName);
    392392            if (ioctl(sock, SIOCGIFFLAGS, &IfReq) < 0)
    393393            {
  • trunk/src/VBox/Main/src-server/freebsd/USBProxyServiceFreeBSD.cpp

    r41528 r47117  
    267267
    268268        struct usb_device_info UsbDevInfo;
    269         memset(&UsbDevInfo, 0, sizeof(struct usb_device_info));
     269        RT_ZERO(UsbDevInfo);
    270270
    271271        rc = ioctl(FileUsb, USB_GET_DEVICEINFO, &UsbDevInfo);
Note: See TracChangeset for help on using the changeset viewer.

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