Skip to content

Commit

Permalink
NFS: Clean up nfs41_same_server_scope()
Browse files Browse the repository at this point in the history
The function is cleaner this way, since we can use the result of
memcmp() directly

Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
amschuma-ntap committed Jan 30, 2017
1 parent 81b68de commit 49ad014
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7120,11 +7120,9 @@ static bool
nfs41_same_server_scope(struct nfs41_server_scope *a,
struct nfs41_server_scope *b)
{
if (a->server_scope_sz == b->server_scope_sz &&
memcmp(a->server_scope, b->server_scope, a->server_scope_sz) == 0)
return true;

return false;
if (a->server_scope_sz != b->server_scope_sz)
return false;
return memcmp(a->server_scope, b->server_scope, a->server_scope_sz) == 0;
}

static void
Expand Down

0 comments on commit 49ad014

Please sign in to comment.