diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-11 10:56:37 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-11 10:56:37 +0000 |
commit | d864af5b2cc90bf9385e5ec7a2b1e0b6a2583754 (patch) | |
tree | 55638ec5c9789159f25822f692c879c8fec5ff42 | |
parent | 4b4cf7520ea68dad19cfd324c0752582807a5082 (diff) | |
download | busybox-w32-d864af5b2cc90bf9385e5ec7a2b1e0b6a2583754.tar.gz busybox-w32-d864af5b2cc90bf9385e5ec7a2b1e0b6a2583754.tar.bz2 busybox-w32-d864af5b2cc90bf9385e5ec7a2b1e0b6a2583754.zip |
fix buglets found by randomconfig run
git-svn-id: svn://busybox.net/trunk/busybox@18064 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | archival/bbunzip.c | 16 | ||||
-rw-r--r-- | coreutils/Kbuild | 3 | ||||
-rw-r--r-- | coreutils/diff.c | 4 |
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 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * Modified for busybox by Glenn McGrath <bug1@iinet.net.au> | 3 | * Common code for gunzip-like applets |
4 | * Added support output to stdout by Thomas Lundquist <thomasez@zelow.no> | ||
5 | * | 4 | * |
6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
7 | */ | 6 | */ |
@@ -127,6 +126,8 @@ int unpack(char **argv, | |||
127 | return exitcode; | 126 | return exitcode; |
128 | } | 127 | } |
129 | 128 | ||
129 | #if ENABLE_BUNZIP2 || ENABLE_UNLZMA || ENABLE_UNCOMPRESS | ||
130 | |||
130 | static | 131 | static |
131 | char* make_new_name_generic(char *filename, const char *expected_ext) | 132 | char* make_new_name_generic(char *filename, const char *expected_ext) |
132 | { | 133 | { |
@@ -140,6 +141,17 @@ char* make_new_name_generic(char *filename, const char *expected_ext) | |||
140 | return filename; | 141 | return filename; |
141 | } | 142 | } |
142 | 143 | ||
144 | #endif | ||
145 | |||
146 | |||
147 | /* vi: set sw=4 ts=4: */ | ||
148 | /* | ||
149 | * Modified for busybox by Glenn McGrath <bug1@iinet.net.au> | ||
150 | * Added support output to stdout by Thomas Lundquist <thomasez@zelow.no> | ||
151 | * | ||
152 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
153 | */ | ||
154 | |||
143 | #if ENABLE_BUNZIP2 | 155 | #if ENABLE_BUNZIP2 |
144 | 156 | ||
145 | static | 157 | 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:= | |||
10 | lib-$(CONFIG_BASENAME) += basename.o | 10 | lib-$(CONFIG_BASENAME) += basename.o |
11 | lib-$(CONFIG_CAL) += cal.o | 11 | lib-$(CONFIG_CAL) += cal.o |
12 | lib-$(CONFIG_CAT) += cat.o | 12 | lib-$(CONFIG_CAT) += cat.o |
13 | lib-$(CONFIG_LESS) += cat.o # less uses it if stdout isn't a tty | 13 | lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty |
14 | lib-$(CONFIG_LESS) += cat.o # less too | ||
14 | lib-$(CONFIG_CATV) += catv.o | 15 | lib-$(CONFIG_CATV) += catv.o |
15 | lib-$(CONFIG_CHGRP) += chgrp.o chown.o | 16 | lib-$(CONFIG_CHGRP) += chgrp.o chown.o |
16 | lib-$(CONFIG_CHMOD) += chmod.o | 17 | 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; | |||
82 | static const char *label1; | 82 | static const char *label1; |
83 | static const char *label2; | 83 | static const char *label2; |
84 | static struct stat stb1, stb2; | 84 | static struct stat stb1, stb2; |
85 | static char **dl; | 85 | USE_FEATURE_DIFF_DIR(static char **dl;) |
86 | USE_FEATURE_DIFF_DIR(static int dl_count;) | 86 | USE_FEATURE_DIFF_DIR(static int dl_count;) |
87 | 87 | ||
88 | struct cand { | 88 | struct cand { |
@@ -1051,7 +1051,7 @@ static int add_to_dirlist(const char *filename, | |||
1051 | { | 1051 | { |
1052 | /* +2: with space for eventual trailing NULL */ | 1052 | /* +2: with space for eventual trailing NULL */ |
1053 | dl = xrealloc(dl, (dl_count+2) * sizeof(dl[0])); | 1053 | dl = xrealloc(dl, (dl_count+2) * sizeof(dl[0])); |
1054 | dl[dl_count] = xstrdup(filename + (int)userdata); | 1054 | dl[dl_count] = xstrdup(filename + (int)(ptrdiff_t)userdata); |
1055 | dl_count++; | 1055 | dl_count++; |
1056 | return TRUE; | 1056 | return TRUE; |
1057 | } | 1057 | } |