From a41fdf331af344ecd3ec230a072857ea197e1890 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 29 Jan 2007 22:51:00 +0000 Subject: preparatory patch for -Wwrite-strings #1 --- applets/applets.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'applets') diff --git a/applets/applets.c b/applets/applets.c index a974743da..8a17cbf0b 100644 --- a/applets/applets.c +++ b/applets/applets.c @@ -106,7 +106,7 @@ static char *get_trimmed_slice(char *s, char *e) } -#define parse_error(x) { err=x; goto pe_label; } +#define parse_error(x) do { errmsg = x; goto pe_label; } while(0) /* Don't depend on the tools to combine strings. */ static const char config_file[] = CONFIG_FILE; @@ -130,7 +130,7 @@ static void parse_config_file(void) struct BB_suid_config *sct; struct BB_applet *applet; FILE *f; - char *err; + const char *errmsg; char *s; char *e; int i, lc, section; @@ -307,7 +307,7 @@ static void parse_config_file(void) pe_label: fprintf(stderr, "Parse error in %s, line %d: %s\n", - config_file, lc, err); + config_file, lc, errmsg); fclose(f); /* Release any allocated memory before returning. */ -- cgit v1.2.3