xfs
[Top] [All Lists]

[PATCH 5/9] xfsdump: remove some unreachable code

To: xfs@xxxxxxxxxxx
Subject: [PATCH 5/9] xfsdump: remove some unreachable code
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Wed, 12 Nov 2014 12:57:14 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1415818638-32700-1-git-send-email-sandeen@xxxxxxxxxx>
References: <1415818638-32700-1-git-send-email-sandeen@xxxxxxxxxx>
in create_windows() we assign INFO_SIZE (which is defined to 4)
to the infosize variable, then test whether it is <= 0.  Remove
the pointless test.

in tsi_cmd_ls(), inside a if ( ! isdirpr ) block, we test whether
isdirpr might be true... remove it.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 invutil/cmenu.c |    2 --
 restore/tree.c  |    5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/invutil/cmenu.c b/invutil/cmenu.c
index ff4abef..c4747b0 100644
--- a/invutil/cmenu.c
+++ b/invutil/cmenu.c
@@ -555,8 +555,6 @@ create_windows()
             menusize, COLS - 1);
 
     infosize = INFO_SIZE;
-    if(infosize <= 0)
-       infosize = 1;
 
     infowin = newwin(infosize, COLS, menusize + 1, 0);
     keypad(infowin, TRUE);
diff --git a/restore/tree.c b/restore/tree.c
index fda4fc5..21d3880 100644
--- a/restore/tree.c
+++ b/restore/tree.c
@@ -2905,11 +2905,10 @@ tsi_cmd_ls( void *ctxp,
         */
        if ( ! isdirpr ) {
                ( * pcb )( pctxp,
-                          "    %s %10llu %s%s\n",
+                          "    %s %10llu %s\n",
                           isselpr ? "*" : " ",
                           ino,
-                          tranp->t_inter.i_name,
-                          isdirpr ? "/" : " " );
+                          tranp->t_inter.i_name);
 
                return;
        }
-- 
1.7.1

<Prev in Thread] Current Thread [Next in Thread>