Date: Fri, 12 Sep 1997 23:54:45 +0930 From: Mike Smith <mike@smith.net.au> To: hackers@freebsd.org Subject: bug in getservent() ? Message-ID: <199709121424.AAA03400@word.smith.net.au>
next in thread | raw e-mail | index | archive | help
One of the interesting observations coming out of a recent discussion has been that getservent() behaves a little oddly with regard to port numbers. Notably, we have this fragment : (int)serv.s_port = htons((u_short)atoi(p)); By my reading, that puts a network-order short into serv.s_port. However elsewhere (eg. getservent(3)) port numbers are referenced as integer quantities; getservent(3) even goes so far as to explicitly mention that the port number is a 32-bit quantity. Any suggestions on a "correct" fix, or is this a "known" BSDism? mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709121424.AAA03400>