VirtualBox

Changeset 28396 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Apr 16, 2010 7:37:03 AM (15 years ago)
Author:
vboxsync
Message:

DrvNAT: minor cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r28365 r28396  
    206206typedef DRVNAT *PDRVNAT;
    207207
    208 /**
    209  * NAT queue item.
    210  */
    211 typedef struct DRVNATQUEUITEM
    212 {
    213     /** The core part owned by the queue manager. */
    214     PDMQUEUEITEMCORE    Core;
    215     /** The buffer for output to guest. */
    216     const uint8_t       *pu8Buf;
    217     /* size of buffer */
    218     size_t              cb;
    219     void                *mbuf;
    220 } DRVNATQUEUITEM;
    221 /** Pointer to a NAT queue item. */
    222 typedef DRVNATQUEUITEM *PDRVNATQUEUITEM;
    223 
    224208
    225209/*******************************************************************************
     
    227211*******************************************************************************/
    228212static void drvNATNotifyNATThread(PDRVNAT pThis, const char *pszWho);
    229 
    230213
    231214
     
    295278        AssertRC(rc);
    296279    }
    297     else if (   RT_FAILURE(rc)
    298              && (  rc == VERR_TIMEOUT
    299                 && rc == VERR_INTERRUPTED))
     280    else if (   rc != VERR_TIMEOUT
     281             && rc != VERR_INTERRUPTED)
    300282    {
    301283        AssertRC(rc);
     
    342324        AssertRC(rc);
    343325    }
    344     else if (   RT_FAILURE(rc)
    345              && rc != VERR_TIMEOUT
     326    else if (   rc != VERR_TIMEOUT
    346327             && rc != VERR_INTERRUPTED)
    347328    {
     
    968949static int drvNATConstructRedir(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pCfg, RTIPV4ADDR Network)
    969950{
    970      RTMAC Mac;
    971      memset(&Mac, 0, sizeof(RTMAC)); /*can't get MAC here */
     951    RTMAC Mac;
     952    RT_ZERO(Mac); /* can't get MAC here */
     953
    972954    /*
    973955     * Enumerate redirections.
     
    12401222                return rc;
    12411223            }
    1242 
    12431224
    12441225            rc = RTReqCreateQueue(&pThis->pRecvReqQueue);
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