Commit 5344b12d authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields

SUNRPC: Make svc_addr's argument a constant

Clean up: Add extra type safety and squelch a few compiler complaints
in upcoming patches.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 396cb3d0
...@@ -266,17 +266,17 @@ struct svc_rqst { ...@@ -266,17 +266,17 @@ struct svc_rqst {
/* /*
* Rigorous type checking on sockaddr type conversions * Rigorous type checking on sockaddr type conversions
*/ */
static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst) static inline struct sockaddr_in *svc_addr_in(const struct svc_rqst *rqst)
{ {
return (struct sockaddr_in *) &rqst->rq_addr; return (struct sockaddr_in *) &rqst->rq_addr;
} }
static inline struct sockaddr_in6 *svc_addr_in6(struct svc_rqst *rqst) static inline struct sockaddr_in6 *svc_addr_in6(const struct svc_rqst *rqst)
{ {
return (struct sockaddr_in6 *) &rqst->rq_addr; return (struct sockaddr_in6 *) &rqst->rq_addr;
} }
static inline struct sockaddr *svc_addr(struct svc_rqst *rqst) static inline struct sockaddr *svc_addr(const struct svc_rqst *rqst)
{ {
return (struct sockaddr *) &rqst->rq_addr; return (struct sockaddr *) &rqst->rq_addr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment