VirtualBox

Changeset 18017 in vbox


Ignore:
Timestamp:
Mar 17, 2009 12:20:49 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
44608
Message:

VBoxManageHostOnly: coding style, fix warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp

    r17759 r18017  
    172172    bool bDhcp = false;
    173173    bool bNetmasklengthv6 = false;
    174     uint32_t uNetmasklengthv6 = -1;
     174    uint32_t uNetmasklengthv6 = (uint32_t)-1;
    175175    const char *pIpv6 = NULL;
    176     const char * pIp = NULL;
    177     const char * pNetmask = NULL;
     176    const char *pIp = NULL;
     177    const char *pNetmask = NULL;
    178178
    179179    int c;
     
    266266    CHECK_ERROR(host, FindHostNetworkInterfaceByName(name, hif.asOutParam()));
    267267
    268     if(FAILED(rc))
     268    if (FAILED(rc))
    269269        return errorArgument("could not find interface '%s'", a->argv[iStart]);
    270270
    271     if(bDhcp)
     271    if (bDhcp)
    272272    {
    273273        CHECK_ERROR(hif, EnableDynamicIpConfig ());
    274274    }
    275     else if(pIp)
    276     {
    277         if(!pNetmask)
     275    else if (pIp)
     276    {
     277        if (!pNetmask)
    278278            pNetmask = "255.255.255.0"; /* ?? */
    279279
    280         CHECK_ERROR(hif, EnableStaticIpConfig (Bstr(pIp), Bstr(pNetmask)));
    281     }
    282     else if(pIpv6)
    283     {
    284         if(uNetmasklengthv6 == -1)
     280        CHECK_ERROR(hif, EnableStaticIpConfig(Bstr(pIp), Bstr(pNetmask)));
     281    }
     282    else if (pIpv6)
     283    {
     284        if (uNetmasklengthv6 == (uint32_t)-1)
    285285            uNetmasklengthv6 = 64; /* ?? */
    286286
    287287        BOOL bIpV6Supported;
    288         CHECK_ERROR(hif, COMGETTER(IPV6Supported) (&bIpV6Supported));
    289         if(!bIpV6Supported)
     288        CHECK_ERROR(hif, COMGETTER(IPV6Supported)(&bIpV6Supported));
     289        if (!bIpV6Supported)
    290290        {
    291291            RTPrintf("IPv6 setting is not supported for this adapter\n");
     
    295295
    296296        Bstr ipv6str(pIpv6);
    297         CHECK_ERROR(hif, EnableStaticIpConfigV6 (ipv6str, (ULONG)uNetmasklengthv6));
     297        CHECK_ERROR(hif, EnableStaticIpConfigV6(ipv6str, (ULONG)uNetmasklengthv6));
    298298    }
    299299    else
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