svn commit: trunk/busybox: archival coreutils

vda at busybox.net vda at busybox.net
Sun Mar 11 10:56:38 UTC 2007


Author: vda
Date: 2007-03-11 03:56:37 -0700 (Sun, 11 Mar 2007)
New Revision: 18064

Log:
fix buglets found by randomconfig run


Modified:
   trunk/busybox/archival/bbunzip.c
   trunk/busybox/coreutils/Kbuild
   trunk/busybox/coreutils/diff.c


Changeset:
Modified: trunk/busybox/archival/bbunzip.c
===================================================================
--- trunk/busybox/archival/bbunzip.c	2007-03-10 17:22:14 UTC (rev 18063)
+++ trunk/busybox/archival/bbunzip.c	2007-03-11 10:56:37 UTC (rev 18064)
@@ -1,7 +1,6 @@
 /* vi: set sw=4 ts=4: */
 /*
- *  Modified for busybox by Glenn McGrath <bug1 at iinet.net.au>
- *  Added support output to stdout by Thomas Lundquist <thomasez at 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 @@
 	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 @@
 	return filename;
 }
 
+#endif
+
+
+/* vi: set sw=4 ts=4: */
+/*
+ *  Modified for busybox by Glenn McGrath <bug1 at iinet.net.au>
+ *  Added support output to stdout by Thomas Lundquist <thomasez at zelow.no>
+ *
+ *  Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ */
+
 #if ENABLE_BUNZIP2
 
 static

Modified: trunk/busybox/coreutils/Kbuild
===================================================================
--- trunk/busybox/coreutils/Kbuild	2007-03-10 17:22:14 UTC (rev 18063)
+++ trunk/busybox/coreutils/Kbuild	2007-03-11 10:56:37 UTC (rev 18064)
@@ -10,7 +10,8 @@
 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

Modified: trunk/busybox/coreutils/diff.c
===================================================================
--- trunk/busybox/coreutils/diff.c	2007-03-10 17:22:14 UTC (rev 18063)
+++ trunk/busybox/coreutils/diff.c	2007-03-11 10:56:37 UTC (rev 18064)
@@ -82,7 +82,7 @@
 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 @@
 {
 	/* +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;
 }




More information about the busybox-cvs mailing list