]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
NFS: Clean up nfs41_same_server_scope()
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 11 Jan 2017 21:51:59 +0000 (16:51 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 30 Jan 2017 18:14:50 +0000 (13:14 -0500)
The function is cleaner this way, since we can use the result of
memcmp() directly

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index 81390e97c8d50595a35b34b821972ca6f45dea87..bf014a2deefd70a042bced793dc27a4871bce3ba 100644 (file)
@@ -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