VirtualBox

Changeset 50480 in vbox


Ignore:
Timestamp:
Feb 17, 2014 3:10:07 PM (11 years ago)
Author:
vboxsync
Message:

VBoxNetLwipNAT::natServicePfRegister: fix trivial constness XXX.

File:
1 edited

Legend:

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

    r50450 r50480  
    650650    int rc = VINF_SUCCESS;
    651651    int socketSpec = SOCK_STREAM;
    652     char *pszHostAddr;
     652    const char *pszHostAddr;
    653653    int sockFamily = (natPf.Pfr.fPfrIPv6 ? PF_INET6 : PF_INET);
    654654
     
    666666
    667667    pszHostAddr = natPf.Pfr.szPfrHostAddr;
    668 
    669     /* XXX: workaround for inet_pton and an empty ipv4 address
    670      * in rule declaration.
    671      */
    672     if (   sockFamily == PF_INET
    673         && pszHostAddr[0] == 0)
    674         pszHostAddr = (char *)"0.0.0.0"; /* XXX: fix it! without type cast */
    675 
     668    if (sockFamily == PF_INET && pszHostAddr[0] == '\0')
     669        pszHostAddr = "0.0.0.0";
    676670
    677671    lrc = fwspec_set(&natPf.FWSpec,
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