public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* Possible bug in nfs-utils source.
@ 2009-01-21 22:25 Ben Greear
  2009-01-21 22:37 ` Chuck Lever
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Greear @ 2009-01-21 22:25 UTC (permalink / raw)
  To: linux-nfs

I'm working on adding support to bind to local addresses, and
I noticed this code in nfs/getport.c

I believe the sizeof should probably be sizeof(*lb_addr) ?

unsigned short nfs_getlocalport(const rpcprot_t program,
				const rpcvers_t version,
				const unsigned short protocol)
{
	struct sockaddr_storage address;
	struct sockaddr *lb_addr = (struct sockaddr *)&address;
	socklen_t lb_len = sizeof(lb_addr);
	unsigned short port = 0;

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-04 23:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 22:25 Possible bug in nfs-utils source Ben Greear
2009-01-21 22:37 ` Chuck Lever
2009-01-21 22:53   ` Ben Greear
2009-01-22  0:00   ` Ben Greear
2009-03-04 22:59     ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox