aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_xdr.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-10-26 13:32:45 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:46 -0500
commitd45273ed6f4613e81701c3e896d9db200c288fff (patch)
tree5108c42f43de3098fe6192e192b872899c8060c1 /fs/nfs/callback_xdr.c
parent6a0ed1de8ecee0cde21ea667891a03f6c84ecd66 (diff)
NFS: Clean up address comparison in __nfs_find_client()
The address comparison in the __nfs_find_client() function is deceptive. It uses a memcmp() to check a pair of u32 fields for equality. Not only is this inefficient, but usually memcmp() is used for comparing two *whole* sockaddr_in's (which includes comparisons of the address family and port number), so it's easy to mistake the comparison here for a whole sockaddr comparison, which it isn't. So for clarity and efficiency, we replace the memcmp() with a simple test for equality between the two s_addr fields. This should have no behavioral effect. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/callback_xdr.c')
0 files changed, 0 insertions, 0 deletions