VirtualBox

Changeset 103288 in vbox for trunk/src


Ignore:
Timestamp:
Feb 9, 2024 10:55:37 AM (11 months ago)
Author:
vboxsync
Message:

Main/ovfreader: Introduce ResourceType_Invalid for 0 and check against it instead of 0, bugref:3409

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ovfreader.h

    r101472 r103288  
    294294enum ResourceType_T
    295295{
     296    ResourceType_Invalid  = 0,
    296297    ResourceType_Other  = 1,
    297298    ResourceType_ComputerSystem = 2,
     
    386387
    387388    VirtualHardwareItem()
    388         : fResourceRequired(false)
     389        : resourceType(ResourceType_Invalid)
     390        , fResourceRequired(false)
    389391        , fAutomaticAllocation(false)
    390392        , fAutomaticDeallocation(false)
  • trunk/src/VBox/Main/xml/ovfreader.cpp

    r101472 r103288  
    923923{
    924924    RTCString name = getItemName();
    925     if (resourceType == 0)
     925    if (resourceType == ResourceType_Invalid)
    926926        throw OVFLogicError(N_("Empty element ResourceType under %s element, line %d. see DMTF Schema Documentation %s"),
    927927                            name.c_str(), m_iLineNumber, DTMF_SPECS_URI);
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