Skip to content

Commit 5108b27

Browse files
hharrisonJ. Bruce Fields
authored andcommitted
nfsd: nfs4xdr.c do-while is not a compound statement
The WRITEMEM macro produces sparse warnings of the form: fs/nfsd/nfs4xdr.c:2668:2: warning: do-while statement is not a compound statement Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
1 parent ad1060c commit 5108b27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/nfsd/nfs4xdr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,11 +1160,11 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
11601160
*p++ = htonl((u32)((n) >> 32)); \
11611161
*p++ = htonl((u32)(n)); \
11621162
} while (0)
1163-
#define WRITEMEM(ptr,nbytes) do if (nbytes > 0) { \
1163+
#define WRITEMEM(ptr,nbytes) do { if (nbytes > 0) { \
11641164
*(p + XDR_QUADLEN(nbytes) -1) = 0; \
11651165
memcpy(p, ptr, nbytes); \
11661166
p += XDR_QUADLEN(nbytes); \
1167-
} while (0)
1167+
}} while (0)
11681168
#define WRITECINFO(c) do { \
11691169
*p++ = htonl(c.atomic); \
11701170
*p++ = htonl(c.before_ctime_sec); \

0 commit comments

Comments
 (0)