VirtualBox

Ignore:
Timestamp:
Mar 11, 2021 1:00:16 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143229
Message:

VBoxManage: getMaxNics() - massage a bit. bugref:9966.

File:
1 edited

Legend:

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

    r88086 r88087  
    3333                        const ComPtr<IMachine> &pMachine)
    3434{
    35     ComPtr<ISystemProperties> info;
    36     ChipsetType_T aChipset;
    3735    ULONG NetworkAdapterCount = 0;
    38     HRESULT rc;
     36    do {
     37        HRESULT rc;
    3938
    40     do {
     39        ComPtr<ISystemProperties> info;
    4140        CHECK_ERROR_BREAK(pVirtualBox, COMGETTER(SystemProperties)(info.asOutParam()));
     41
     42        ChipsetType_T aChipset;
    4243        CHECK_ERROR_BREAK(pMachine, COMGETTER(ChipsetType)(&aChipset));
     44
    4345        CHECK_ERROR_BREAK(info, GetMaxNetworkAdapters(aChipset, &NetworkAdapterCount));
    44 
    45         return (unsigned int)NetworkAdapterCount;
    4646    } while (0);
    4747
    48     return 0;
     48    return (unsigned int)NetworkAdapterCount;
    4949}
    5050
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