Use htonl() rather than htons().
This commit is contained in:
parent
65d748cf46
commit
5ae6fac1d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31148
@ -1332,7 +1332,7 @@ int StrToPort (char* str, char* proto)
|
|||||||
|
|
||||||
port = strtol (str, &end, 10);
|
port = strtol (str, &end, 10);
|
||||||
if (end != str)
|
if (end != str)
|
||||||
return htons (port);
|
return htonl (port);
|
||||||
|
|
||||||
sp = getservbyname (str, proto);
|
sp = getservbyname (str, proto);
|
||||||
if (!sp)
|
if (!sp)
|
||||||
|
@ -1332,7 +1332,7 @@ int StrToPort (char* str, char* proto)
|
|||||||
|
|
||||||
port = strtol (str, &end, 10);
|
port = strtol (str, &end, 10);
|
||||||
if (end != str)
|
if (end != str)
|
||||||
return htons (port);
|
return htonl (port);
|
||||||
|
|
||||||
sp = getservbyname (str, proto);
|
sp = getservbyname (str, proto);
|
||||||
if (!sp)
|
if (!sp)
|
||||||
|
Loading…
Reference in New Issue
Block a user