From b6aae0f38194cd39960a898606ee65d4be93a895 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 29 Jan 2007 22:51:25 +0000 Subject: preparatory patch for -Wwrite-strings #2 --- libbb/dump.c | 2 +- libbb/get_last_path_component.c | 2 +- libbb/xfuncs.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libbb') diff --git a/libbb/dump.c b/libbb/dump.c index 1815ca9..f078afc 100644 --- a/libbb/dump.c +++ b/libbb/dump.c @@ -291,7 +291,7 @@ static void rewrite(FS * fs) } } -static void do_skip(char *fname, int statok) +static void do_skip(const char *fname, int statok) { struct stat sbuf; diff --git a/libbb/get_last_path_component.c b/libbb/get_last_path_component.c index 3119097..b7bc0e6 100644 --- a/libbb/get_last_path_component.c +++ b/libbb/get_last_path_component.c @@ -26,7 +26,7 @@ char *bb_get_last_path_component(char *path) if (*first == '/') { last = first; } - last[1] = 0; + last[1] = '\0'; return first; } diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 54d291a..601ff3f 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -184,7 +184,7 @@ pid_t spawn(char **argv) /* Why static? */ static int failed; pid_t pid; - char *prog; + const char *prog; // Be nice to nommu machines. failed = 0; @@ -240,7 +240,7 @@ void xsetenv(const char *key, const char *value) // Fifth char is always '\0' void smart_ulltoa5(unsigned long long ul, char buf[5]) { - char *fmt; + const char *fmt; char c; unsigned v,idx = 0; ul *= 10; -- cgit v1.1