diff options
author | Rob Landley | 2006-09-12 21:42:17 +0000 |
---|---|---|
committer | Rob Landley | 2006-09-12 21:42:17 +0000 |
commit | 20cc6d567f8cc21405ab05ca62a6955a5b1277b5 (patch) | |
tree | d8f7b3cd70149f3e0e291cc10a14c06917d34cb5 | |
parent | 1b2b5cfba81aab3e56d374ee3dcee97cde4bcb4e (diff) | |
download | busybox-20cc6d567f8cc21405ab05ca62a6955a5b1277b5.zip busybox-20cc6d567f8cc21405ab05ca62a6955a5b1277b5.tar.gz |
Remove pointless "const". Bloatcheck says 0 bytes difference.
-rw-r--r-- | archival/gunzip.c | 4 | ||||
-rw-r--r-- | archival/uncompress.c | 4 | ||||
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | libbb/xfuncs.c | 2 | ||||
-rw-r--r-- | loginutils/deluser.c | 3 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index 7be94e1..a7f5ce4 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -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; diff --git a/archival/uncompress.c b/archival/uncompress.c index 8c466eb..cbcbcef 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c @@ -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; diff --git a/include/libbb.h b/include/libbb.h index cb39e7b..dfb7a70 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -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); diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index e88a538..0f0faaf 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -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); diff --git a/loginutils/deluser.c b/loginutils/deluser.c index 1b9bc44..d93a550 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c @@ -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); diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 9bb70a1..c693cf9 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -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; |