diff options
author | phk <phk@FreeBSD.org> | 2015-09-25 07:37:00 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2015-09-25 07:37:00 +0000 |
commit | 97cc39b53eaeeda8795d91a029ec20e4cf635588 (patch) | |
tree | 8f1a729e3455cff3138d80ed72858d85af3e28ff /sbin | |
parent | ba2d2115688a4a6bad6ca542af1e339ce19a9d93 (diff) | |
download | FreeBSD-src-97cc39b53eaeeda8795d91a029ec20e4cf635588.zip FreeBSD-src-97cc39b53eaeeda8795d91a029ec20e4cf635588.tar.gz |
Fix two cases where "const" were washed off pointers with strchr(3)
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/natd/natd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index 959e1ee..4d9061d 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -124,7 +124,7 @@ static void StrToAddr (const char* str, struct in_addr* addr); static u_short StrToPort (const char* str, const char* proto); static int StrToPortRange (const char* str, const char* proto, port_range *portRange); static int StrToProto (const char* str); -static int StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, port_range *portRange); +static int StrToAddrAndPortRange (char* str, struct in_addr* addr, char* proto, port_range *portRange); static void ParseArgs (int argc, char** argv); static void SetupPunchFW(const char *strValue); static void SetupSkinnyPort(const char *strValue); @@ -1896,7 +1896,7 @@ u_short StrToPort (const char* str, const char* proto) int StrToPortRange (const char* str, const char* proto, port_range *portRange) { - char* sep; + const char* sep; struct servent* sp; char* end; u_short loPort; @@ -1938,7 +1938,8 @@ int StrToPortRange (const char* str, const char* proto, port_range *portRange) } -int StrToProto (const char* str) +static int +StrToProto (const char* str) { if (!strcmp (str, "tcp")) return IPPROTO_TCP; @@ -1949,7 +1950,8 @@ int StrToProto (const char* str) errx (1, "unknown protocol %s. Expected tcp or udp", str); } -int StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, port_range *portRange) +static int +StrToAddrAndPortRange (char* str, struct in_addr* addr, char* proto, port_range *portRange) { char* ptr; |