https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295434
Bug ID: 295434
Summary: libalias' _RandomPort() should use htons() instead of
ntohs()
Product: Base System
Version: Unspecified
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Created attachment 270933
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=270933&action=edit
Patch for replacing ntohs() to htons() in _RandomPort()
In sys/netinet/libalias/alias_db.c, the comment for _RandomPort() says that the
return value is in network byte order. The code currently uses ntohs() for the
byte-order conversion, but htons() would better reflect the intention. Since
both functions perform the same conversion, I think the attached patch can be
applied as-is.
--
You are receiving this mail because:
You are the assignee for the bug.