Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
NFSD: Remove unused values from nfsd4_encode_components_esc()
Browse files Browse the repository at this point in the history
Clean up. The computed value of @p is saved each time through the
loop but is never used.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
chucklever committed Nov 19, 2024
1 parent 6b9c108 commit 30c1d24
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2652,13 +2652,10 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,

strlen = end - str;
if (strlen) {
p = xdr_reserve_space(xdr, strlen + 4);
if (!p)
if (xdr_stream_encode_opaque(xdr, str, strlen) < 0)
return nfserr_resource;
p = xdr_encode_opaque(p, str, strlen);
count++;
}
else
} else
end++;
if (found_esc)
end = next;
Expand Down

0 comments on commit 30c1d24

Please sign in to comment.