svn commit: trunk/busybox: archival include libbb loginutils util-l etc...

landley at busybox.net landley at busybox.net
Tue Sep 12 21:42:18 UTC 2006


Author: landley
Date: 2006-09-12 14:42:17 -0700 (Tue, 12 Sep 2006)
New Revision: 16110

Log:
Remove pointless "const".  Bloatcheck says 0 bytes difference.


Modified:
   trunk/busybox/archival/gunzip.c
   trunk/busybox/archival/uncompress.c
   trunk/busybox/include/libbb.h
   trunk/busybox/libbb/xfuncs.c
   trunk/busybox/loginutils/deluser.c
   trunk/busybox/util-linux/swaponoff.c


Changeset:
Modified: trunk/busybox/archival/gunzip.c
===================================================================
--- trunk/busybox/archival/gunzip.c	2006-09-12 20:29:22 UTC (rev 16109)
+++ trunk/busybox/archival/gunzip.c	2006-09-12 21:42:17 UTC (rev 16110)
@@ -48,8 +48,8 @@
 
 	do {
 		struct stat stat_buf;
-		const char *old_path = argv[optind];
-		const char *delete_path = NULL;
+		char *old_path = argv[optind];
+		char *delete_path = NULL;
 		char *new_path = NULL;
 		int src_fd;
 		int dst_fd;

Modified: trunk/busybox/archival/uncompress.c
===================================================================
--- trunk/busybox/archival/uncompress.c	2006-09-12 20:29:22 UTC (rev 16109)
+++ trunk/busybox/archival/uncompress.c	2006-09-12 21:42:17 UTC (rev 16110)
@@ -19,8 +19,8 @@
 	flags = bb_getopt_ulflags(argc, argv, "cf");
 
 	while (optind < argc) {
-		const char *compressed_file = argv[optind++];
-		const char *delete_path = NULL;
+		char *compressed_file = argv[optind++];
+		char *delete_path = NULL;
 		char *uncompressed_file = NULL;
 		int src_fd;
 		int dst_fd;

Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2006-09-12 20:29:22 UTC (rev 16109)
+++ trunk/busybox/include/libbb.h	2006-09-12 21:42:17 UTC (rev 16110)
@@ -189,7 +189,7 @@
 extern int   bb_fclose_nonstdin(FILE *f);
 extern void  bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN;
 
-extern void xstat(const char * const filename, struct stat *buf);
+extern void xstat(char *filename, struct stat *buf);
 extern int  xsocket(int domain, int type, int protocol);
 extern pid_t spawn(char **argv);
 extern pid_t xspawn(char **argv);

Modified: trunk/busybox/libbb/xfuncs.c
===================================================================
--- trunk/busybox/libbb/xfuncs.c	2006-09-12 20:29:22 UTC (rev 16109)
+++ trunk/busybox/libbb/xfuncs.c	2006-09-12 21:42:17 UTC (rev 16110)
@@ -490,7 +490,7 @@
 
 #ifdef L_xstat
 /* xstat() - a stat() which dies on failure with meaningful error message */
-void xstat(const char * const name, struct stat *stat_buf)
+void xstat(char *name, struct stat *stat_buf)
 {
         if (stat(name, stat_buf))
                 bb_perror_msg_and_die("Can't stat '%s'", name);

Modified: trunk/busybox/loginutils/deluser.c
===================================================================
--- trunk/busybox/loginutils/deluser.c	2006-09-12 20:29:22 UTC (rev 16109)
+++ trunk/busybox/loginutils/deluser.c	2006-09-12 21:42:17 UTC (rev 16110)
@@ -60,7 +60,8 @@
 
 
 	if ((passwd = bb_wfopen(filename, "r"))) {
-		xstat(filename, &statbuf);
+		// Remove pointless const.
+		xstat((char *)filename, &statbuf);
 		buffer = (char *) xmalloc(statbuf.st_size * sizeof(char));
 		fread(buffer, statbuf.st_size, sizeof(char), passwd);
 		fclose(passwd);

Modified: trunk/busybox/util-linux/swaponoff.c
===================================================================
--- trunk/busybox/util-linux/swaponoff.c	2006-09-12 20:29:22 UTC (rev 16109)
+++ trunk/busybox/util-linux/swaponoff.c	2006-09-12 21:42:17 UTC (rev 16110)
@@ -15,7 +15,7 @@
 #include <sys/swap.h>
 
 
-static int swap_enable_disable(const char *device)
+static int swap_enable_disable(char *device)
 {
 	int status;
 	struct stat st;




More information about the busybox-cvs mailing list