mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 16:29:50 +00:00
Prepend '-' to the first argument if required, more const, indent
This commit is contained in:
parent
f588869696
commit
f1ab127077
@ -61,11 +61,16 @@ extern int ar_main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
archive_handle_t *archive_handle;
|
archive_handle_t *archive_handle;
|
||||||
unsigned long opt;
|
unsigned long opt;
|
||||||
char *msg_unsupported_err = "Archive %s not supported. Install binutils 'ar'.";
|
static const char msg_unsupported_err[] =
|
||||||
|
"Archive %s not supported. Install binutils 'ar'.";
|
||||||
char magic[8];
|
char magic[8];
|
||||||
|
|
||||||
archive_handle = init_handle();
|
archive_handle = init_handle();
|
||||||
|
|
||||||
|
/* Prepend '-' to the first argument if required */
|
||||||
|
if (argv[1][0] != '-')
|
||||||
|
argv[1] = bb_xasprintf("-%s", argv[1]);
|
||||||
|
|
||||||
bb_opt_complementally = "?p~tx:t~px:x~pt";
|
bb_opt_complementally = "?p~tx:t~px:x~pt";
|
||||||
opt = bb_getopt_ulflags(argc, argv, "ptxovcr");
|
opt = bb_getopt_ulflags(argc, argv, "ptxovcr");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user