diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:58 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:58 +0200 |
commit | fe2d505d4df0ebae0e519abeb2cccfeb10ef80ac (patch) | |
tree | 3511c0d06d4de0cc65af6710d1e2bfae53e9e8b7 /common/hush.c | |
parent | dbf8680a0a9a983e8edd320d1ea812f7d6a1f1c8 (diff) | |
download | barebox-fe2d505d4df0ebae0e519abeb2cccfeb10ef80ac.tar.gz barebox-fe2d505d4df0ebae0e519abeb2cccfeb10ef80ac.tar.xz |
svn_rev_481
make more char * const, fix compiler warnings
Diffstat (limited to 'common/hush.c')
-rw-r--r-- | common/hush.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/common/hush.c b/common/hush.c index c96bab89e6..ba1ffce58c 100644 --- a/common/hush.c +++ b/common/hush.c @@ -464,7 +464,7 @@ static int redirect_opt_num(o_string *o); static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, int subst_end); static int parse_group(o_string *dest, struct p_context *ctx, struct in_str *input, int ch); #endif -static char *lookup_param(char *src); +static const char *lookup_param(char *src); static char *make_string(char **inp); static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *input); #ifndef __U_BOOT__ @@ -487,7 +487,7 @@ static void remove_bg_job(struct pipe *pi); /* local variable support */ static char **make_list_in(char **inp, char *name); static char *insert_var_value(char *inp); -static char *get_local_var(const char *var); +static const char *get_local_var(const char *var); #ifndef __U_BOOT__ static void unset_local_var(const char *name); #endif @@ -2105,7 +2105,7 @@ static char *get_dollar_var(char ch); #endif /* This is used to get/check local shell variables */ -static char *get_local_var(const char *s) +static const char *get_local_var(const char *s) { if (!s) return NULL; @@ -2639,9 +2639,9 @@ static int parse_group(o_string *dest, struct p_context *ctx, /* basically useful version until someone wants to get fancier, * see the bash man page under "Parameter Expansion" */ -static char *lookup_param(char *src) +static const char *lookup_param(char *src) { - char *p; + const char *p; if (!src) return NULL; @@ -3261,7 +3261,8 @@ static char *insert_var_value(char *inp) int res_str_len = 0; int len; int done = 0; - char *p, *p1, *res_str = NULL; + char *p, *res_str = NULL; + const char *p1; while ((p = strchr(inp, SPECIAL_VAR_SYMBOL))) { if (p != inp) { |