diff options
-rw-r--r-- | archival/ar.c | 1 | ||||
-rw-r--r-- | archival/bunzip2.c | 3 | ||||
-rw-r--r-- | archival/cpio.c | 17 | ||||
-rw-r--r-- | archival/dpkg_deb.c | 1 | ||||
-rw-r--r-- | archival/gunzip.c | 1 | ||||
-rw-r--r-- | archival/libunarchive/unpack_ar_archive.c | 1 | ||||
-rw-r--r-- | archival/uncompress.c | 1 | ||||
-rw-r--r-- | archival/unzip.c | 1 | ||||
-rw-r--r-- | console-tools/setconsole.c | 2 | ||||
-rw-r--r-- | coreutils/cut.c | 1 | ||||
-rw-r--r-- | coreutils/date.c | 1 | ||||
-rw-r--r-- | coreutils/dos2unix.c | 1 | ||||
-rw-r--r-- | coreutils/env.c | 2 | ||||
-rw-r--r-- | coreutils/install.c | 2 | ||||
-rw-r--r-- | coreutils/ls.c | 2 | ||||
-rw-r--r-- | coreutils/mkdir.c | 2 | ||||
-rw-r--r-- | coreutils/mv.c | 2 | ||||
-rw-r--r-- | coreutils/stat.c | 2 | ||||
-rw-r--r-- | coreutils/sum.c | 1 | ||||
-rw-r--r-- | coreutils/uudecode.c | 2 | ||||
-rw-r--r-- | coreutils/uuencode.c | 1 | ||||
-rw-r--r-- | debianutils/readlink.c | 7 | ||||
-rw-r--r-- | debianutils/start_stop_daemon.c | 2 |
23 files changed, 20 insertions, 36 deletions
diff --git a/archival/ar.c b/archival/ar.c index 21096d712..411a25e0a 100644 --- a/archival/ar.c +++ b/archival/ar.c @@ -27,7 +27,6 @@ */ #include <fcntl.h> -#include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/archival/bunzip2.c b/archival/bunzip2.c index 740e26919..2ce6cfb86 100644 --- a/archival/bunzip2.c +++ b/archival/bunzip2.c @@ -6,7 +6,6 @@ */ #include <fcntl.h> -#include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -35,7 +34,7 @@ int bunzip2_main(int argc, char **argv) src_fd = STDIN_FILENO; filename = 0; } - + /* if called as bzcat force the stdout flag */ if ((opt & BUNZIP2_OPT_STDOUT) || bb_applet_name[2] == 'c') filename = 0; diff --git a/archival/cpio.c b/archival/cpio.c index 0fbe7b8e5..820f03e9b 100644 --- a/archival/cpio.c +++ b/archival/cpio.c @@ -24,20 +24,19 @@ * */ #include <fcntl.h> -#include <getopt.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "unarchive.h" #include "busybox.h" -#define CPIO_OPT_EXTRACT 0x01 -#define CPIO_OPT_TEST 0x02 -#define CPIO_OPT_UNCONDITIONAL 0x04 -#define CPIO_OPT_VERBOSE 0x08 -#define CPIO_OPT_FILE 0x10 +#define CPIO_OPT_EXTRACT 0x01 +#define CPIO_OPT_TEST 0x02 +#define CPIO_OPT_UNCONDITIONAL 0x04 +#define CPIO_OPT_VERBOSE 0x08 +#define CPIO_OPT_FILE 0x10 #define CPIO_OPT_CREATE_LEADING_DIR 0x20 -#define CPIO_OPT_PRESERVE_MTIME 0x40 +#define CPIO_OPT_PRESERVE_MTIME 0x40 extern int cpio_main(int argc, char **argv) { @@ -59,7 +58,7 @@ extern int cpio_main(int argc, char **argv) } if (opt & CPIO_OPT_TEST) { - /* if both extract and test option are given, ignore extract option */ + /* if both extract and test options are given, ignore extract option */ if (opt & CPIO_OPT_EXTRACT) { opt &= ~CPIO_OPT_EXTRACT; } @@ -79,7 +78,7 @@ extern int cpio_main(int argc, char **argv) archive_handle->action_header = header_list; } } - if (cpio_filename) { /* CPIO_OPT_FILE */ + if (cpio_filename) { /* CPIO_OPT_FILE */ archive_handle->src_fd = bb_xopen(cpio_filename, O_RDONLY); archive_handle->seek = seek_by_jump; } diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index 6c665e57a..1e8bd8ad2 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c @@ -18,7 +18,6 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <getopt.h> #include "unarchive.h" #include "busybox.h" diff --git a/archival/gunzip.c b/archival/gunzip.c index beb7bd12e..a4db7ca31 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -63,7 +63,6 @@ static char *license_msg[] = { #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <getopt.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/archival/libunarchive/unpack_ar_archive.c b/archival/libunarchive/unpack_ar_archive.c index e8f113bcf..fa48c6fca 100644 --- a/archival/libunarchive/unpack_ar_archive.c +++ b/archival/libunarchive/unpack_ar_archive.c @@ -16,7 +16,6 @@ #include <fcntl.h> #include <stdlib.h> #include <string.h> -#include <getopt.h> #include "unarchive.h" #include "busybox.h" diff --git a/archival/uncompress.c b/archival/uncompress.c index 48b4e2cad..3bd87093e 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c @@ -20,7 +20,6 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <getopt.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/archival/unzip.c b/archival/unzip.c index d60cb4db4..50d148692 100644 --- a/archival/unzip.c +++ b/archival/unzip.c @@ -38,7 +38,6 @@ */ #include <fcntl.h> -#include <getopt.h> #include <stdlib.h> #include <string.h> #include <unistd.h> diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index 5806f21ed..6b4989d77 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c @@ -24,7 +24,7 @@ #include <sys/types.h> #include <fcntl.h> #include <stdio.h> -#include <getopt.h> +#include <getopt.h> /* struct option */ #include "busybox.h" diff --git a/coreutils/cut.c b/coreutils/cut.c index f65754e63..f9c72ca81 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c @@ -23,7 +23,6 @@ #include <stdio.h> #include <stdlib.h> -#include <getopt.h> #include <unistd.h> #include <string.h> #include <limits.h> diff --git a/coreutils/date.c b/coreutils/date.c index 0488b2de3..9583a0036 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -29,7 +29,6 @@ #include <time.h> #include <stdio.h> #include <string.h> -#include <getopt.h> #include "busybox.h" diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index 3488f3354..0c419aca7 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c @@ -28,7 +28,6 @@ */ #include <string.h> -#include <getopt.h> #include <unistd.h> #include <stdint.h> #include <fcntl.h> diff --git a/coreutils/env.c b/coreutils/env.c index 70cef6588..1a8ad7c78 100644 --- a/coreutils/env.c +++ b/coreutils/env.c @@ -47,7 +47,7 @@ #include <stdlib.h> #include <errno.h> #include <unistd.h> -#include <getopt.h> +#include <getopt.h> /* struct option */ #include "busybox.h" diff --git a/coreutils/install.c b/coreutils/install.c index e22dda6f9..74e1d9acd 100644 --- a/coreutils/install.c +++ b/coreutils/install.c @@ -23,10 +23,10 @@ #include <sys/stat.h> #include <sys/types.h> #include <errno.h> -#include <getopt.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <getopt.h> /* struct option */ #include "busybox.h" #include "libcoreutils/coreutils.h" diff --git a/coreutils/ls.c b/coreutils/ls.c index ac2557a55..4dfa9f507 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -60,7 +60,7 @@ enum { #include <fcntl.h> #include <signal.h> #include <termios.h> -#include <getopt.h> +#include <getopt.h> /* struct option */ #include <sys/ioctl.h> #include <sys/sysmacros.h> /* major() and minor() */ #include "busybox.h" diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 50364f17f..e24ef4f89 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c @@ -31,7 +31,7 @@ #include <stdlib.h> #include <unistd.h> -#include <getopt.h> +#include <getopt.h> /* struct option */ #include "busybox.h" static const struct option mkdir_long_options[] = { diff --git a/coreutils/mv.c b/coreutils/mv.c index 43a8e6d7d..aef1ed19a 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c @@ -31,7 +31,7 @@ #include <dirent.h> #include <errno.h> #include <stdlib.h> -#include <getopt.h> +#include <getopt.h> /* struct option */ #include "busybox.h" #include "libcoreutils/coreutils.h" diff --git a/coreutils/stat.c b/coreutils/stat.c index 4afe249c0..138cc9e8b 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c @@ -30,7 +30,7 @@ #include <grp.h> #include <sys/vfs.h> #include <time.h> -#include <getopt.h> +#include <getopt.h> /* optind */ #include <sys/stat.h> #include <sys/statfs.h> #include <sys/statvfs.h> diff --git a/coreutils/sum.c b/coreutils/sum.c index 3b4941d28..0a9c9734f 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c @@ -18,7 +18,6 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> -#include <getopt.h> #include "busybox.h" diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 57d4e8371..6167c9fad 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c @@ -24,7 +24,7 @@ #include <stdio.h> #include <errno.h> -#include <getopt.h> +#include <getopt.h> /* optind */ #include <string.h> #include <stdlib.h> diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index 42f629f48..2660f4a19 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c @@ -19,7 +19,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <getopt.h> #include <stdio.h> #include <string.h> #include <stdlib.h> diff --git a/debianutils/readlink.c b/debianutils/readlink.c index 90927bb74..dd5612052 100644 --- a/debianutils/readlink.c +++ b/debianutils/readlink.c @@ -43,8 +43,6 @@ int readlink_main(int argc, char **argv) RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX); #endif - /* no options, no getopt */ - if (optind + 1 != argc) bb_show_usage(); @@ -58,9 +56,8 @@ int readlink_main(int argc, char **argv) if (!buf) return EXIT_FAILURE; puts(buf); -#ifdef CONFIG_FEATURE_CLEAN_UP - free(buf); -#endif + + if (ENABLE_FEATURE_CLEAN_UP) free(buf); return EXIT_SUCCESS; } diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 4fce80dbb..b1ebe2fa7 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c @@ -16,7 +16,7 @@ #include <sys/stat.h> #include <dirent.h> #include <unistd.h> -#include <getopt.h> +#include <getopt.h> /* struct option */ #include "busybox.h" #include "pwd_.h" |