From: Anna Schumaker Date: Wed, 11 Jan 2017 21:51:59 +0000 (-0500) Subject: NFS: Clean up nfs41_same_server_scope() X-Git-Tag: v4.14-rc1~1210^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49ad0145c3a81612482ecc064ce6ab908ae3bb1a;p=platform%2Fkernel%2Flinux-rpi3.git 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 --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 81390e9..bf014a2 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -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