[PATCH] xfsdump: Remove dead code from restore_extent().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove dead code and from restore_extent() in content.c.
Variable rttrunc is constantly 0.

Coverity CID 1618877

Signed-off-by: Bill O'Donnell <bodonnel@xxxxxxxxxx>
---
 restore/content.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/restore/content.c b/restore/content.c
index 7ec3a4d..20f9dbf 100644
--- a/restore/content.c
+++ b/restore/content.c
@@ -8495,7 +8495,6 @@ restore_extent(filehdr_t *fhdrp,
 				      tries++,
 				      remaining -= (size_t)rval,
 				      tmp_off += (off64_t)rval) {
-					int rttrunc = 0;
 					int trycnt = 0;
 					assert(remaining
 						<=
@@ -8535,12 +8534,6 @@ restore_extent(filehdr_t *fhdrp,
 						      tmp_off,
 						      rval);
 					}
-					if (rttrunc) {
-						/* truncate and re-set rval */
-						if (rval == remaining)
-							rval = rttrunc;
-						ftruncate(fd, bstatp->bs_size);
-					}
 				}
 			} else {
 				nwritten = (int)ntowrite;
-- 
2.46.0





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux