VirtualBox

Changeset 43176 in vbox


Ignore:
Timestamp:
Sep 4, 2012 5:50:31 PM (12 years ago)
Author:
vboxsync
Message:

more windows build fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/socket.cpp

    r43174 r43176  
    779779            memset(szDummy, '\0', 10);
    780780
    781             rc = RTStrPrintf(szDummy, 10, "%u", *pubDummy);
    782 
    783             if (!rc || rc > 3 || rc < 1)
     781            size_t cb = RTStrPrintf(szDummy, 10, "%u", *pubDummy);
     782
     783            if (!cb || cb > 3 || cb < 1)
    784784                return VERR_NET_ADDRESS_NOT_AVAILABLE;
    785785
    786             memcpy(pszIpV4Address, szDummy, rc);
    787 
    788             pszIpV4Address = (pszIpV4Address + rc);
     786            memcpy(pszIpV4Address, szDummy, cb);
     787
     788            pszIpV4Address = (pszIpV4Address + cb);
    789789
    790790            if (i < 3)
     
    827827            memset(szDummy, '\0', 10);
    828828
    829             rc = RTStrPrintf(szDummy, 10, "%02x", *pubDummy);
    830 
    831             if (rc != 2)
     829            size_t cb = RTStrPrintf(szDummy, 10, "%02x", *pubDummy);
     830
     831            if (cb != 2)
    832832                return VERR_NET_ADDRESS_NOT_AVAILABLE;
    833833
    834             memcpy(pszIpV6Address, szDummy, rc);
    835 
    836             pszIpV6Address = pszIpV6Address + rc;
     834            memcpy(pszIpV6Address, szDummy, cb);
     835
     836            pszIpV6Address = pszIpV6Address + cb;
    837837            pubDummy++;
    838838        }
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