aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 7a82b441b..f6750ae33 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -695,12 +695,8 @@ int tar_main(int argc, char **argv)
695 } 695 }
696 696
697 /* Prepend '-' to the first argument if required */ 697 /* Prepend '-' to the first argument if required */
698 if (argv[1][0] != '-') { 698 if (argv[1][0] != '-')
699 char *tmp; 699 argv[1] = bb_xasprintf("-%s", argv[1]);
700
701 bb_xasprintf(&tmp, "-%s", argv[1]);
702 argv[1] = tmp;
703 }
704 700
705 /* Initialise default values */ 701 /* Initialise default values */
706 tar_handle = init_handle(); 702 tar_handle = init_handle();