nfsd4: typo logical vs bitwise negate
Subsystems (3)
PATCH 1/1 nfsd4: typo logical vs bitwise negate
This should be a bitwise negate here. It silences a Sparse warning:fs/nfsd/nfs4xdr.c:693:16: warning: dubious: x & !y
Signed-off-by Dan Carpenter <[email protected]>
fs/nfsd/nfs4xdr.c +1 -1
@@ -690,7 +690,7 @@ static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x)READ_BUF (4 );READ32 (*x);/* Note: unlinke access bits, deny bits may be zero. */ -if (*x & !NFS4_SHARE_DENY_BOTH ) +if (*x & ~NFS4_SHARE_DENY_BOTH )return nfserr_bad_xdr;return nfs_ok; xdr_error:
Quoted 2 lines · Dan Carpenter
This should be a bitwise negate here. It silences a Sparse warning:
fs/nfsd/nfs4xdr.c:693:16: warning: dubious: x & !y
Whoops, thanks for catching that!
Applying for 3.2.--b.
Quoted 16 lines
Signed-off-by Dan Carpenter <[email protected]>fs/nfsd/nfs4xdr.c +1
-1@@ -690,7 +690,7 @@ static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x)READ_BUF (4 );READ32 (*x);/* Note: unlinke access bits, deny bits may be zero. */ -if (*x & !NFS4_SHARE_DENY_BOTH ) +if (*x & ~NFS4_SHARE_DENY_BOTH )return nfserr_bad_xdr;return nfs_ok; xdr_error: