Remove pointless "const". Bloatcheck says 0 bytes difference.
This commit is contained in:
parent
1b2b5cfba8
commit
20cc6d567f
@ -48,8 +48,8 @@ int gunzip_main(int argc, char **argv)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
struct stat stat_buf;
|
struct stat stat_buf;
|
||||||
const char *old_path = argv[optind];
|
char *old_path = argv[optind];
|
||||||
const char *delete_path = NULL;
|
char *delete_path = NULL;
|
||||||
char *new_path = NULL;
|
char *new_path = NULL;
|
||||||
int src_fd;
|
int src_fd;
|
||||||
int dst_fd;
|
int dst_fd;
|
||||||
|
@ -19,8 +19,8 @@ int uncompress_main(int argc, char **argv)
|
|||||||
flags = bb_getopt_ulflags(argc, argv, "cf");
|
flags = bb_getopt_ulflags(argc, argv, "cf");
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
const char *compressed_file = argv[optind++];
|
char *compressed_file = argv[optind++];
|
||||||
const char *delete_path = NULL;
|
char *delete_path = NULL;
|
||||||
char *uncompressed_file = NULL;
|
char *uncompressed_file = NULL;
|
||||||
int src_fd;
|
int src_fd;
|
||||||
int dst_fd;
|
int dst_fd;
|
||||||
|
@ -189,7 +189,7 @@ extern FILE *xfopen(const char *path, const char *mode);
|
|||||||
extern int bb_fclose_nonstdin(FILE *f);
|
extern int bb_fclose_nonstdin(FILE *f);
|
||||||
extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN;
|
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 int xsocket(int domain, int type, int protocol);
|
||||||
extern pid_t spawn(char **argv);
|
extern pid_t spawn(char **argv);
|
||||||
extern pid_t xspawn(char **argv);
|
extern pid_t xspawn(char **argv);
|
||||||
|
@ -490,7 +490,7 @@ void xlisten(int s, int backlog)
|
|||||||
|
|
||||||
#ifdef L_xstat
|
#ifdef L_xstat
|
||||||
/* xstat() - a stat() which dies on failure with meaningful error message */
|
/* 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))
|
if (stat(name, stat_buf))
|
||||||
bb_perror_msg_and_die("Can't stat '%s'", name);
|
bb_perror_msg_and_die("Can't stat '%s'", name);
|
||||||
|
@ -60,7 +60,8 @@ static void del_line_matching(const char *login, const char *filename)
|
|||||||
|
|
||||||
|
|
||||||
if ((passwd = bb_wfopen(filename, "r"))) {
|
if ((passwd = bb_wfopen(filename, "r"))) {
|
||||||
xstat(filename, &statbuf);
|
// Remove pointless const.
|
||||||
|
xstat((char *)filename, &statbuf);
|
||||||
buffer = (char *) xmalloc(statbuf.st_size * sizeof(char));
|
buffer = (char *) xmalloc(statbuf.st_size * sizeof(char));
|
||||||
fread(buffer, statbuf.st_size, sizeof(char), passwd);
|
fread(buffer, statbuf.st_size, sizeof(char), passwd);
|
||||||
fclose(passwd);
|
fclose(passwd);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <sys/swap.h>
|
#include <sys/swap.h>
|
||||||
|
|
||||||
|
|
||||||
static int swap_enable_disable(const char *device)
|
static int swap_enable_disable(char *device)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
Loading…
Reference in New Issue
Block a user