Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



On Fri, Jul 25, 2008 at 07:01:13PM +0100, David Laight wrote:
 > I suspect you don't want to rely on ntohs() only evaluating its arg once.
 > so:
 >              port = ipf_random() % (np->in_pmax - np->in_pmin);
 >              port = ntohs(port);

Surely that should be htons, as arithmetic had better be happening in
host byte order...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index