summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-08-21 17:22:11 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-08-21 17:40:10 -0400
commitaf6d572134b012ca92c4efc8a2f1cadbe5d01064 (patch)
tree057465a1a9cdb39664d6660e172f7c81f762d850 /include/linux/sunrpc
parentf23abfdb94fda3108441530cb4a813088d3f9176 (diff)
svcrpc: don't bother checking bad svc_addr_len result
None of the callers should see an unsupported address family (only one of them even bothers to check for that case), so just check for the buggy case in svc_addr_len and don't bother elsewhere. Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/svc_xprt.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 73c7a68667ea..193dddab6511 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -167,8 +167,7 @@ static inline size_t svc_addr_len(const struct sockaddr *sa)
case AF_INET6:
return sizeof(struct sockaddr_in6);
}
-
- return 0;
+ BUG();
}
static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt)