diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-10-28 10:10:23 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2008-10-28 10:10:23 -0400 |
commit | 1ee34cfa8cf3ce56f43690eba44215aafb1835a5 (patch) | |
tree | 1d9ea9488d5e6cf0bd440e1100d9c28eeb628680 | |
parent | 98ca016d5a2fb7a7da9e2332e3c59b123b820477 (diff) | |
download | rpcbind-1ee34cfa8cf3ce56f43690eba44215aafb1835a5.tar.gz |
rpcbind: Squelch a compiler warning
Remove a needless pointer-to-integer conversion. getnameinfo(3) wants
a size value greater than or equal to offsetof(struct sockaddr_un,
sun_path). Since pointers can be different sizes depending on the
hardware platform, let's make this a simple constant instead.
This eliminates the compiler warning:
rpcinfo.c: In function sa_len
rpcinfo.c:666: warning: cast from pointer to integer of different size
when building on x86-64.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | src/rpcinfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpcinfo.c b/src/rpcinfo.c index afd949b..0170f65 100644 --- a/src/rpcinfo.c +++ b/src/rpcinfo.c @@ -663,7 +663,7 @@ sa_len(struct sockaddr *sa) switch (sa->sa_family) { case AF_LOCAL: - salen = (socklen_t) (((struct sockaddr_un *) NULL)->sun_path); + salen = sizeof (struct sockaddr_un); break; case AF_INET: salen = sizeof (struct sockaddr_in); |