summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko2007-08-18 15:32:12 +0000
committerDenis Vlasenko2007-08-18 15:32:12 +0000
commitfe7cd642b0b732f5d41403c2f6983ad676b69dd9 (patch)
treee5962885cb72c976f44b178a350a92ba5f1aa02d /archival
parentd6cd9d7fe9eab19a9e36fdda729c78c40205b1e5 (diff)
downloadbusybox-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.zip
busybox-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.tar.gz
don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
Diffstat (limited to 'archival')
-rw-r--r--archival/ar.c2
-rw-r--r--archival/bbunzip.c8
-rw-r--r--archival/cpio.c2
-rw-r--r--archival/dpkg.c2
-rw-r--r--archival/dpkg_deb.c2
-rw-r--r--archival/gzip.c2
-rw-r--r--archival/tar.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/archival/ar.c b/archival/ar.c
index 7b16c2b..db23c2b 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -52,7 +52,7 @@ int ar_main(int argc, char **argv)
/* Prepend '-' to the first argument if required */
opt_complementary = "--:p:t:x:-1:p--tx:t--px:x--pt";
- opt = getopt32(argc, argv, "ptxovcr");
+ opt = getopt32(argv, "ptxovcr");
if (opt & AR_CTX_PRINT) {
archive_handle->action_data = data_extract_to_stdout;
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index f824fcf..56c742a 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -161,7 +161,7 @@ USE_DESKTOP(long long) int unpack_bunzip2(void)
int bunzip2_main(int argc, char **argv);
int bunzip2_main(int argc, char **argv)
{
- getopt32(argc, argv, "cf");
+ getopt32(argv, "cf");
argv += optind;
if (applet_name[2] == 'c')
option_mask32 |= OPT_STDOUT;
@@ -260,7 +260,7 @@ USE_DESKTOP(long long) int unpack_gunzip(void)
int gunzip_main(int argc, char **argv);
int gunzip_main(int argc, char **argv)
{
- getopt32(argc, argv, "cfvdt");
+ getopt32(argv, "cfvdt");
argv += optind;
/* if called as zcat */
if (applet_name[1] == 'c')
@@ -298,7 +298,7 @@ USE_DESKTOP(long long) int unpack_unlzma(void)
int unlzma_main(int argc, char **argv);
int unlzma_main(int argc, char **argv)
{
- getopt32(argc, argv, "c");
+ getopt32(argv, "c");
argv += optind;
/* lzmacat? */
if (applet_name[4] == 'c')
@@ -340,7 +340,7 @@ USE_DESKTOP(long long) int unpack_uncompress(void)
int uncompress_main(int argc, char **argv);
int uncompress_main(int argc, char **argv)
{
- getopt32(argc, argv, "cf");
+ getopt32(argv, "cf");
argv += optind;
return bbunpack(argv, make_new_name_uncompress, unpack_uncompress);
diff --git a/archival/cpio.c b/archival/cpio.c
index 72d31c3..9188e09 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -35,7 +35,7 @@ int cpio_main(int argc, char **argv)
archive_handle->seek = seek_by_read;
archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE;
- opt = getopt32(argc, argv, "ituvF:dm", &cpio_filename);
+ opt = getopt32(argv, "ituvF:dm", &cpio_filename);
/* One of either extract or test options must be given */
if ((opt & (CPIO_OPT_TEST | CPIO_OPT_EXTRACT)) == 0) {
diff --git a/archival/dpkg.c b/archival/dpkg.c
index b5fc06d..337576c 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1579,7 +1579,7 @@ int dpkg_main(int argc, char **argv)
OPT_unpack = 0x40,
};
- opt = getopt32(argc, argv, "CF:ilPru", &str_f);
+ opt = getopt32(argv, "CF:ilPru", &str_f);
//if (opt & OPT_configure) ... // -C
if (opt & OPT_force_ignore_depends) { // -F (--force in official dpkg)
if (strcmp(str_f, "depends"))
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 6dd8171..9781b54 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -42,7 +42,7 @@ int dpkg_deb_main(int argc, char **argv)
#endif
opt_complementary = "?c--efXx:e--cfXx:f--ceXx:X--cefx:x--cefX";
- opt = getopt32(argc, argv, "cefXx");
+ opt = getopt32(argv, "cefXx");
if (opt & DPKG_DEB_OPT_CONTENTS) {
tar_archive->action_header = header_verbose_list;
diff --git a/archival/gzip.c b/archival/gzip.c
index 83d78e4..bda4ae1 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2031,7 +2031,7 @@ int gzip_main(int argc, char **argv)
unsigned opt;
/* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
- opt = getopt32(argc, argv, "cfv" USE_GUNZIP("d") "q123456789" );
+ opt = getopt32(argv, "cfv" USE_GUNZIP("d") "q123456789" );
option_mask32 &= 0x7; /* Clear -d, ignore -q, -0..9 */
//if (opt & 0x1) // -c
//if (opt & 0x2) // -f
diff --git a/archival/tar.c b/archival/tar.c
index bed8cf2..9bf9058 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -788,7 +788,7 @@ int tar_main(int argc, char **argv)
#if ENABLE_FEATURE_TAR_LONG_OPTIONS
applet_long_options = tar_longopts;
#endif
- opt = getopt32(argc, argv,
+ opt = getopt32(argv,
"txC:f:Opvk"
USE_FEATURE_TAR_CREATE( "ch" )
USE_FEATURE_TAR_BZIP2( "j" )