NFSD:fix boolreturn.cocci warning
authorChangcheng Deng <deng.changcheng@zte.com.cn>
Tue, 19 Oct 2021 04:14:22 +0000 (04:14 +0000)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 19 Oct 2021 14:36:48 +0000 (10:36 -0400)
./fs/nfsd/nfssvc.c: 1072: 8-9: :WARNING return of 0/1 in function
'nfssvc_decode_voidarg' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfssvc.c

index 362e819ff06a777de7126197fa2d07e32b477e7d..80431921e5d79932127502b6feb1ab7f626e11e7 100644 (file)
@@ -1069,7 +1069,7 @@ out_encode_err:
  */
 bool nfssvc_decode_voidarg(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
-       return 1;
+       return true;
 }
 
 /**