staging: lusture: mgc: Bool tests do not need comparison
PATCH 1/1 staging: lusture: mgc: Bool tests do not need comparison
Bool initializations should use true and false thus bool tests don't need an explicit comparison.
This issue was found using the following Coccinelle script:
@@
bool x;
symbol true;
symbol false;
@@
(
- x == true
+ x
|
- true == x
+ x
|
- x != true
+ !x
|
- true != x
+ !x
|
- x == false
+ !x
|
- false == x
+ !x
|
- x != false
+ x
|
- false != x
+ x
)
Signed-off-by Bhaktipriya Shridhar <[email protected]>
--- drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/mgc/mgc_request.c +1 -1
@@ -1378,7 +1378,7 @@ again: eof = res->mcr_offset == res->mcr_size;CDEBUG (D_INFO ,"Latest version %lld, more %d.\n" , - res->mcr_offset, eof == false); + res->mcr_offset, !eof); ealen =sptlrpc_cli_unwrap_bulk_read (req, req->rq_bulk,0 );if (ealen <0 ) {
--
2.1.4