Message ID | 20240903174140.268614-2-bodonnel@redhat.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | xfsdump: Remove dead code from restore_extent(). | expand |
On 9/3/24 12:41 PM, Bill O'Donnell wrote: > 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@redhat.com> > --- > restore/content.c | 7 ------- > 1 file changed, 7 deletions(-) > Looks like dead code. Reviewed-by: Mark Tinguely <mark.tinguely@oracle.com>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
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;
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@redhat.com> --- restore/content.c | 7 ------- 1 file changed, 7 deletions(-)