Remove pointless "const". Bloatcheck says 0 bytes difference.
authorRob Landley <rob@landley.net>
Tue, 12 Sep 2006 21:42:17 +0000 (21:42 -0000)
committerRob Landley <rob@landley.net>
Tue, 12 Sep 2006 21:42:17 +0000 (21:42 -0000)
archival/gunzip.c
archival/uncompress.c
include/libbb.h
libbb/xfuncs.c
loginutils/deluser.c
util-linux/swaponoff.c

index 7be94e1b8df0ae513f779d8cfb49e6a08b3e114f..a7f5ce4810a7fe3ee6bb2ebd7542b085e36fab47 100644 (file)
@@ -48,8 +48,8 @@ int gunzip_main(int argc, char **argv)
 
        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;
index 8c466ebdf9d7df3597ef932c2ac82fa0638bb9e8..cbcbcefed7cc4a2e5033a6cba2ee3577cb172985 100644 (file)
@@ -19,8 +19,8 @@ int uncompress_main(int argc, char **argv)
        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;
index cb39e7b3f7cad0a049fe61b0697cd5224c6ec8ce..dfb7a70bd3a8f837da8e7d065d818b36cedeeef8 100644 (file)
@@ -189,7 +189,7 @@ extern FILE *xfopen(const char *path, const char *mode);
 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);
index e88a5380fbd125dbbf9303e4cf50b9740090cf94..0f0faaf7407673ad761dab5ab164e2ce9d466c79 100644 (file)
@@ -490,7 +490,7 @@ void xlisten(int s, int backlog)
 
 #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);
index 1b9bc4439f62d59b8fba3f9aa8b7af4f31d453a9..d93a550fa341798e65262dded51cb2294a561489 100644 (file)
@@ -60,7 +60,8 @@ static void del_line_matching(const char *login, const char *filename)
 
 
        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);
index 9bb70a1f5a797710d50a6e0cb86a54d9173e600c..c693cf9b58745dbd4421c6cc68ec586b2fa61191 100644 (file)
@@ -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;