All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: Possible bug in nfs-utils source.
Date: Wed, 21 Jan 2009 16:00:27 -0800	[thread overview]
Message-ID: <4977B71B.4030003@candelatech.com> (raw)
In-Reply-To: <2055BE67-5060-4D4E-BB0A-A8E61152A2EC@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

Chuck Lever wrote:
> On Jan 21, 2009, at Jan 21, 2009, 5:25 PM, Ben Greear wrote:
>> 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) ?
> 
> Yes.  Can you submit a patch to Steve and copy the list?


The patch is attached.

Signed-Off-By:  Ben Greear <greearb@candelatech.com>

Thanks,
Ben

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


[-- Attachment #2: nfs_sizeof.patch --]
[-- Type: text/x-patch, Size: 445 bytes --]

diff --git a/support/nfs/getport.c b/support/nfs/getport.c
index 47824a2..f5f7049 100644
--- a/support/nfs/getport.c
+++ b/support/nfs/getport.c
@@ -836,7 +836,7 @@ unsigned short nfs_getlocalport(const rpcprot_t program,
 {
 	struct sockaddr_storage address;
 	struct sockaddr *lb_addr = (struct sockaddr *)&address;
-	socklen_t lb_len = sizeof(lb_addr);
+	socklen_t lb_len = sizeof(*lb_addr);
 	unsigned short port = 0;
 
 #ifdef NFS_GP_LOCAL

  parent reply	other threads:[~2009-01-22  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2009-03-04 22:59     ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4977B71B.4030003@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.