[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5436) htons() expects an unsigned short



Rein Tollevik writes:
>On Tue, 18 Mar 2008, Hallvard B Furuseth wrote:
>> (...)
>> short is signed by definition.
>
> More the good reason why it should be cast to an unsigned then, as
> that is what htons() expects.

Yup.

> No, I don't have a test case.  This is a fairly insignificant bugfix I
> commited to our copy of the source six years ago and has never gotten
> around to report back (sorry for that).

Right, then I'll not bother try to figure out how it broke.  Maybe it's
an incomplete cleanup after some other error which has been fixed.

-- 
Hallvard