mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
htonl() and ntohl() operate on unsinged types, so they must zero-extend,
not sign-extend. Fix a comment in the former to that effect, and change the latter over to do the right conversion.
This commit is contained in:
parent
eac1eda045
commit
ca31253aa8
2 changed files with 2 additions and 2 deletions
|
|
@ -57,5 +57,5 @@
|
|||
.set CNAME(htonl),CNAME(__htonl)
|
||||
ENTRY(__htonl)
|
||||
retl
|
||||
srl %o0, 0, %o0 /* zero extend -- or do we sign extend? */
|
||||
srl %o0, 0, %o0 /* zero extend */
|
||||
END(__htonl)
|
||||
|
|
|
|||
|
|
@ -57,5 +57,5 @@
|
|||
.set CNAME(ntohl),CNAME(__ntohl)
|
||||
ENTRY(__ntohl)
|
||||
retl
|
||||
signx %o0, %o0
|
||||
srl %o0, 0, %o0 /* zero extend */
|
||||
END(__ntohl)
|
||||
|
|
|
|||
Loading…
Reference in a new issue