VirtualBox

Changeset 48903 in vbox for trunk/src/VBox/NetworkServices


Ignore:
Timestamp:
Oct 5, 2013 6:56:24 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89583
Message:

VBoxNetLwipNAT: PortForwardListener::PortForwardListener() explicitly initializes m_pNAT with NULL

PortForwardListener::init(VBoxNetLwipNAT *) allows only non-NULL values.
PortForwardListener::(un)init() assign m_pNAT to NULL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp

    r48876 r48903  
    178178{
    179179public:
     180    PortForwardListener():m_pNAT(NULL){}
    180181
    181182    HRESULT init(VBoxNetLwipNAT *pNAT)
    182183    {
     184        AssertPtrReturn(pNAT, E_INVALIDARG);
     185
    183186        m_pNAT = pNAT;
    184187        return S_OK;
    185188    }
    186189
    187     HRESULT init() { return init(NULL); }
    188 
    189     void uninit() { init(NULL); }
     190    HRESULT init()
     191    {
     192        m_pNAT = NULL;
     193        return S_OK;
     194    }
     195
     196    void uninit() { m_pNAT = NULL; }
    190197
    191198    STDMETHOD(HandleEvent)(VBoxEventType_T aEventType, IEvent *pEvent)
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