Commit a3056ac5 authored by Trond Myklebust's avatar Trond Myklebust

Subject: [PATCH] NFS: Use sizeof() instead of C macro

 Replace a C macro with sizeof().
Signed-off-by: default avatarChuck Lever <cel@netapp.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
parent 1d809e4d
......@@ -52,7 +52,6 @@
#include <asm/uaccess.h>
#define NFSDBG_FACILITY NFSDBG_VFS
#define VERF_SIZE (2 * sizeof(__u32))
#define MAX_DIRECTIO_SIZE (4096UL << PAGE_SHIFT)
......@@ -303,11 +302,11 @@ nfs_direct_write_seg(struct inode *inode, struct nfs_open_context *ctx,
if (tot_bytes == 0)
memcpy(&first_verf.verifier, &wdata.verf.verifier,
VERF_SIZE);
sizeof(first_verf.verifier));
if (wdata.verf.committed != NFS_FILE_SYNC) {
need_commit = 1;
if (memcmp(&first_verf.verifier,
&wdata.verf.verifier, VERF_SIZE))
if (memcmp(&first_verf.verifier, &wdata.verf.verifier,
sizeof(first_verf.verifier)));
goto sync_retry;
}
......@@ -332,7 +331,7 @@ nfs_direct_write_seg(struct inode *inode, struct nfs_open_context *ctx,
if (result < 0 || memcmp(&first_verf.verifier,
&wdata.verf.verifier,
VERF_SIZE) != 0)
sizeof(first_verf.verifier)) != 0)
goto sync_retry;
}
result = tot_bytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment