VirtualBox

Changeset 107475 in vbox


Ignore:
Timestamp:
Jan 8, 2025 4:54:47 AM (2 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166533
Message:

FE/Qt: bugref:3409: VM Settings / USB page: Fix for similar parfait warnings related to redundant condition.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp

    r106061 r107475  
    377377    bool fSuccess = true;
    378378    /* Save USB settings from cache: */
    379     if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
     379    if (/*fSuccess &&*/ isMachineInValidMode() && m_pCache->wasChanged())
    380380    {
    381381        /* Get new USB data from cache: */
     
    383383
    384384        /* Save USB data: */
    385         if (fSuccess && isMachineOffline())
     385        if (/*fSuccess &&*/ isMachineOffline())
    386386        {
    387387            /* Remove USB controllers: */
    388388            if (!newUsbData.m_fUSBEnabled)
    389389                fSuccess = removeUSBControllers();
    390 
     390            /* Create/update USB controllers: */
    391391            else
    392 
    393             /* Create/update USB controllers: */
    394             if (newUsbData.m_fUSBEnabled)
    395392                fSuccess = createUSBControllers(newUsbData.m_enmUSBControllerType);
    396393        }
     
    416413
    417414                    /* Remove filter marked for 'remove' or 'update': */
    418                     if (fSuccess && (filterCache.wasRemoved() || filterCache.wasUpdated()))
    419                     {
     415                    if (/*fSuccess &&*/ (filterCache.wasRemoved() || filterCache.wasUpdated()))
    420416                        fSuccess = removeUSBFilter(comFiltersObject, iOperationPosition);
    421                         if (fSuccess && filterCache.wasRemoved())
    422                             --iOperationPosition;
    423                     }
     417
     418                    /* Decrease operation position for removed filter: */
     419                    if (fSuccess && filterCache.wasRemoved())
     420                        --iOperationPosition;
    424421
    425422                    /* Create filter marked for 'create' or 'update': */
     
    460457            /* Get controller type for further activities: */
    461458            KUSBControllerType enmType = KUSBControllerType_Null;
    462             if (fSuccess)
     459            // if (fSuccess)
    463460            {
    464461                enmType = comController.GetType();
     
    483480
    484481                /* Remove controller: */
    485                 if (fSuccess)
     482                // if (fSuccess)
    486483                {
    487484                    m_machine.RemoveUSBController(comController.GetName());
     
    565562                    if (fSuccess)
    566563                    {
    567                         if (fSuccess && !cOhciCtls)
     564                        if (/*fSuccess &&*/ !cOhciCtls)
    568565                        {
    569566                            m_machine.AddUSBController("OHCI", KUSBControllerType_OHCI);
     
    649646        {
    650647            /* Save whether filter is active: */
    651             if (fSuccess)
     648            // if (fSuccess)
    652649            {
    653650                comFilter.SetActive(filterData.m_guiData.m_fActive);
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