From 431ec4e6b1a6f1007098abd3b138da2a0758c7ae Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Tue, 22 Sep 2009 10:22:57 -0500 Subject: [PATCH] xfs_fsr: fix test for short write Clang found this one too, as a dead nested assignment. The point is to see if we write all the bytes; but the initial assignment is backwards. It's safe in the end, because if they weren't already equal anyway, we'd have exited prior to this, but it's worth fixing up for clarity. Signed-of-by: Eric Sandeen Reviewed-by: Christoph Hellwig --- fsr/xfs_fsr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c index 9f2bf24c7..253a55d90 100644 --- a/fsr/xfs_fsr.c +++ b/fsr/xfs_fsr.c @@ -1190,7 +1190,7 @@ packfile(char *fname, char *tname, int fd, } if (nfrags) { /* Do a matching write to the tmp file */ - wc = wc_b4; + wc_b4 = wc; if (((wc = write(ffd, fbuf, wc)) != wc_b4)) { fsrprintf(_("bad write of %d bytes " "to %s: %s\n"), -- 2.47.2