Reverse my previous change and use htons() on an int

instead of htonl() !

This results in the int a,b,c,d changing to b,a,c,d,
but as it's subsequently coerced to a u_short, the
ultimate answer is correct.

If this isn't fixed properly soon (by the author) I'll
have a look at it again.

Noted by:	eivind & ari@suutari.iki.fi
This commit is contained in:
Brian Somers 1997-12-06 12:00:32 +00:00
parent 91241944ea
commit 27c20503c6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31576
2 changed files with 2 additions and 2 deletions

View File

@ -1332,7 +1332,7 @@ int StrToPort (char* str, char* proto)
port = strtol (str, &end, 10);
if (end != str)
return htonl (port);
return htons (port);
sp = getservbyname (str, proto);
if (!sp)

View File

@ -1332,7 +1332,7 @@ int StrToPort (char* str, char* proto)
port = strtol (str, &end, 10);
if (end != str)
return htonl (port);
return htons (port);
sp = getservbyname (str, proto);
if (!sp)