Cleanup patch by Bernhard Fischer, removing unnecessary includes of
authorRob Landley <rob@landley.net>
Sun, 11 Sep 2005 01:05:30 +0000 (01:05 -0000)
committerRob Landley <rob@landley.net>
Sun, 11 Sep 2005 01:05:30 +0000 (01:05 -0000)
getopt.h, whitespace changes, typos, etc.

23 files changed:
archival/ar.c
archival/bunzip2.c
archival/cpio.c
archival/dpkg_deb.c
archival/gunzip.c
archival/libunarchive/unpack_ar_archive.c
archival/uncompress.c
archival/unzip.c
console-tools/setconsole.c
coreutils/cut.c
coreutils/date.c
coreutils/dos2unix.c
coreutils/env.c
coreutils/install.c
coreutils/ls.c
coreutils/mkdir.c
coreutils/mv.c
coreutils/stat.c
coreutils/sum.c
coreutils/uudecode.c
coreutils/uuencode.c
debianutils/readlink.c
debianutils/start_stop_daemon.c

index 21096d712807362230f8c6cbd930b10f3da09d93..411a25e0ae4b4ccdcfc07cd56a8128c454919dde 100644 (file)
@@ -27,7 +27,6 @@
  */
 
 #include <fcntl.h>
-#include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 740e269195ebc15acb2da9cff8026dd99ea146b4..2ce6cfb86f8a575a0ea9fc0291a334c0823cc795 100644 (file)
@@ -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;
index 0fbe7b8e54c76982ef8be0f30f505a0b767c803f..820f03e9bc651454c60537c2b34ad68909eda12b 100644 (file)
  *
  */
 #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;
        }
index 6c665e57af80bd713f2a222a7f2a333ca03f97fa..1e8bd8ad270f193e6be79aa45318bf1e7a4b3911 100644 (file)
@@ -18,7 +18,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <getopt.h>
 
 #include "unarchive.h"
 #include "busybox.h"
index beb7bd12eb37bd8464f0d79d34b802ca2ddf5c48..a4db7ca31e731317d3030f477c1499d2def221fa 100644 (file)
@@ -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>
index e8f113bcf5167e8dacb0e6b28df8f3a2017e4ed5..fa48c6fcac656cbf83bfed581457b54d84dc7a7c 100644 (file)
@@ -16,7 +16,6 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
-#include <getopt.h>
 #include "unarchive.h"
 #include "busybox.h"
 
index 48b4e2cad5ab1f67a707d721cd425b0448186c0f..3bd87093e9a2b411adae1efa2bcf6dfeebeedc98 100644 (file)
@@ -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>
index d60cb4db4331564048cabca1089a27ca82607384..50d148692e9252adfdeee5ed9cf1a6ead4e7e0e8 100644 (file)
@@ -38,7 +38,6 @@
  */
 
 #include <fcntl.h>
-#include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 5806f21ede44db808d4edba28afcea2d5685f470..6b4989d776a9edd852dda20b2333f3527dd53de8 100644 (file)
@@ -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"
 
index f65754e632a876717d914ff4ae2248fa1797ad85..f9c72ca81bea597d086b0e641e3f27e8e8153e51 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <getopt.h>
 #include <unistd.h>
 #include <string.h>
 #include <limits.h>
index 0488b2de381642ea8382b7ef5dde967bfb9d77f5..9583a003653d6859000cb98bd6ee8034249d18a6 100644 (file)
@@ -29,7 +29,6 @@
 #include <time.h>
 #include <stdio.h>
 #include <string.h>
-#include <getopt.h>
 #include "busybox.h"
 
 
index 3488f3354b97dcb716907cdf1deb6832dbdda08c..0c419aca79a30d6051fe6a6defcf54345e9756d1 100644 (file)
@@ -28,7 +28,6 @@
  */
 
 #include <string.h>
-#include <getopt.h>
 #include <unistd.h>
 #include <stdint.h>
 #include <fcntl.h>
index 70cef6588c5800bb26cc8e0b1699b78454d82a46..1a8ad7c787fe95167b211c2d3084a53198ff1b34 100644 (file)
@@ -47,7 +47,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
-#include <getopt.h>
+#include <getopt.h> /* struct option */
 #include "busybox.h"
 
 
index e22dda6f9d7f8a14c014779e6853239b19beb109..74e1d9acd0db370742f167109c36836e693e899a 100644 (file)
 #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"
index ac2557a55ae79b1fa90856a7258564e134132dbd..4dfa9f507d5acdae8216c5d86d2c8062c4f3c393 100644 (file)
@@ -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"
index 50364f17fd343c1b47859d87eab552d7933d4ed8..e24ef4f89a18d9f3c2c1dc1d66c2eb67abe11d0c 100644 (file)
@@ -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[] = {
index 43a8e6d7d7b0e5ff7e18b8db6ffd58bedd4f33db..aef1ed19a2b4b6c7afa1eb2b9b7cc0f2343e696b 100644 (file)
@@ -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"
 
index 4afe249c0cc91d243c50b7bbed074d635166d15f..138cc9e8b8fc7c61b78bcd0568499ae55fb9a12c 100644 (file)
@@ -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>
index 3b4941d28460c3d461d2c7e88f8736d91af764f1..0a9c9734f423d2a0393a10043e84e852ccde29ce 100644 (file)
@@ -18,7 +18,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <getopt.h>
 
 #include "busybox.h"
 
index 57d4e83717670c95f6b2b8c921cc6eec013dfd96..6167c9fad2d2842de6c66baaf6357f5c89a43568 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include <getopt.h>
+#include <getopt.h> /* optind */
 #include <string.h>
 #include <stdlib.h>
 
index 42f629f48ad040b3ed3da2388e0ec5a4e3ccaa29..2660f4a193b047c2f878a1077d41c529897613a0 100644 (file)
@@ -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>
index 90927bb7436eda3d6b8dd1f9e18a282a5301c547..dd5612052da7644a556d77b31e0e33b56be6d595 100644 (file)
@@ -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;
 }
index 4fce80dbb0cbeafde1ce97ab435bfba1f0da7f50..b1ebe2fa7daa5d3ca8ee88a89f116f12e9fe1ff5 100644 (file)
@@ -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"