提交 fbb7878c 编写于 作者: J J. Bruce Fields

nfsd: clean up svc_reserve_auth()

This is a void function attempting to return the return value from
another void function, which seems harmless but extremely weird, and
apparently makes some compilers complain.

While we're there, clean up a little (e.g. the switch statement had a
minor style problem and seemed overkill as long as there's only one
case).

Thanks to Trond for noticing this.
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
上级 c64e80d5
......@@ -409,16 +409,13 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t);
* for all cases without actually generating the checksum, so we just use a
* static value.
*/
static inline void
svc_reserve_auth(struct svc_rqst *rqstp, int space)
static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space)
{
int added_space = 0;
switch(rqstp->rq_authop->flavour) {
case RPC_AUTH_GSS:
if (rqstp->rq_authop->flavour)
added_space = RPC_MAX_AUTH_SIZE;
}
return svc_reserve(rqstp, space + added_space);
svc_reserve(rqstp, space + added_space);
}
#endif /* SUNRPC_SVC_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册