summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-11-12 10:02:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-11-12 14:47:15 +0100
commit671cf43e56e9b2b9a086f4656bd0767b7d4b2986 (patch)
tree799b9f2d192d01aba2f34bf2427cdb9ba233799b /common
parent1d8041b03f9634adae00ce79e861dd028b573884 (diff)
downloadbarebox-671cf43e56e9b2b9a086f4656bd0767b7d4b2986.tar.gz
barebox-671cf43e56e9b2b9a086f4656bd0767b7d4b2986.tar.xz
consolidate syntax() and syntax_err()
syntax is defined as syntax_err. Drop syntax_err and call syntax instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/hush.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/hush.c b/common/hush.c
index 95054b37c7..3c4d2445f0 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -132,7 +132,6 @@ extern int do_bootd(int flag, int argc, char *argv[]); /* do_bootd */
#define EXIT_SUCCESS 0
#define EOF -1
-#define syntax() syntax_err()
#define xstrdup strdup
#define error_msg printf
@@ -265,7 +264,7 @@ struct in_str {
#define final_printf debug
-static void syntax_err(void) {
+static void syntax(void) {
printf("syntax error\n");
}
@@ -1551,7 +1550,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
b_getch(input);
done_pipe(ctx, PIPE_AND);
} else {
- syntax_err();
+ syntax();
return 1;
}
break;
@@ -1564,7 +1563,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
/* we could pick up a file descriptor choice here
* with redirect_opt_num(), but bash doesn't do it.
* "echo foo 2| cat" yields "foo 2". */
- syntax_err();
+ syntax();
return 1;
}
break;