diff options
author | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-01-11 16:51:59 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-01-30 13:14:50 -0500 |
commit | 49ad0145c3a81612482ecc064ce6ab908ae3bb1a (patch) | |
tree | adcaa7f2255485793cce93aeb9c6589c5309202e | |
parent | 81b68de493a3c60517ef0435d2635b531ed590b9 (diff) |
NFS: Clean up nfs41_same_server_scope()
The function is cleaner this way, since we can use the result of
memcmp() directly
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 81390e97c8d5..bf014a2deefd 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -7120,11 +7120,9 @@ static bool | |||
7120 | nfs41_same_server_scope(struct nfs41_server_scope *a, | 7120 | nfs41_same_server_scope(struct nfs41_server_scope *a, |
7121 | struct nfs41_server_scope *b) | 7121 | struct nfs41_server_scope *b) |
7122 | { | 7122 | { |
7123 | if (a->server_scope_sz == b->server_scope_sz && | 7123 | if (a->server_scope_sz != b->server_scope_sz) |
7124 | memcmp(a->server_scope, b->server_scope, a->server_scope_sz) == 0) | 7124 | return false; |
7125 | return true; | 7125 | return memcmp(a->server_scope, b->server_scope, a->server_scope_sz) == 0; |
7126 | |||
7127 | return false; | ||
7128 | } | 7126 | } |
7129 | 7127 | ||
7130 | static void | 7128 | static void |