aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-11 10:56:37 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-11 10:56:37 +0000
commita4688bf55de75db06af9d816ac7e6c7b7b19964a (patch)
tree55638ec5c9789159f25822f692c879c8fec5ff42
parentbe644a81e91bcfacfc8948a39e5184fa6cba663e (diff)
downloadbusybox-a4688bf55de75db06af9d816ac7e6c7b7b19964a.tar.gz
fix buglets found by randomconfig run
-rw-r--r--archival/bbunzip.c16
-rw-r--r--coreutils/Kbuild3
-rw-r--r--coreutils/diff.c4
3 files changed, 18 insertions, 5 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index b922fd373..91dd5404c 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -1,7 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * Modified for busybox by Glenn McGrath <bug1@iinet.net.au>
- * Added support output to stdout by Thomas Lundquist <thomasez@zelow.no>
+ * Common code for gunzip-like applets
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
@@ -127,6 +126,8 @@ int unpack(char **argv,
return exitcode;
}
+#if ENABLE_BUNZIP2 || ENABLE_UNLZMA || ENABLE_UNCOMPRESS
+
static
char* make_new_name_generic(char *filename, const char *expected_ext)
{
@@ -140,6 +141,17 @@ char* make_new_name_generic(char *filename, const char *expected_ext)
return filename;
}
+#endif
+
+
+/* vi: set sw=4 ts=4: */
+/*
+ * Modified for busybox by Glenn McGrath <bug1@iinet.net.au>
+ * Added support output to stdout by Thomas Lundquist <thomasez@zelow.no>
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ */
+
#if ENABLE_BUNZIP2
static
diff --git a/coreutils/Kbuild b/coreutils/Kbuild
index 55f19b4ca..dfdcbd43c 100644
--- a/coreutils/Kbuild
+++ b/coreutils/Kbuild
@@ -10,7 +10,8 @@ lib-y:=
lib-$(CONFIG_BASENAME) += basename.o
lib-$(CONFIG_CAL) += cal.o
lib-$(CONFIG_CAT) += cat.o
-lib-$(CONFIG_LESS) += cat.o # less uses it if stdout isn't a tty
+lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty
+lib-$(CONFIG_LESS) += cat.o # less too
lib-$(CONFIG_CATV) += catv.o
lib-$(CONFIG_CHGRP) += chgrp.o chown.o
lib-$(CONFIG_CHMOD) += chmod.o
diff --git a/coreutils/diff.c b/coreutils/diff.c
index 73b576f31..fa6ef105e 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -82,7 +82,7 @@ static char *start;
static const char *label1;
static const char *label2;
static struct stat stb1, stb2;
-static char **dl;
+USE_FEATURE_DIFF_DIR(static char **dl;)
USE_FEATURE_DIFF_DIR(static int dl_count;)
struct cand {
@@ -1051,7 +1051,7 @@ static int add_to_dirlist(const char *filename,
{
/* +2: with space for eventual trailing NULL */
dl = xrealloc(dl, (dl_count+2) * sizeof(dl[0]));
- dl[dl_count] = xstrdup(filename + (int)userdata);
+ dl[dl_count] = xstrdup(filename + (int)(ptrdiff_t)userdata);
dl_count++;
return TRUE;
}