summaryrefslogtreecommitdiffstats
path: root/common/env.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:58 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:58 +0200
commitfe2d505d4df0ebae0e519abeb2cccfeb10ef80ac (patch)
tree3511c0d06d4de0cc65af6710d1e2bfae53e9e8b7 /common/env.c
parentdbf8680a0a9a983e8edd320d1ea812f7d6a1f1c8 (diff)
downloadbarebox-fe2d505d4df0ebae0e519abeb2cccfeb10ef80ac.tar.gz
svn_rev_481
make more char * const, fix compiler warnings
Diffstat (limited to 'common/env.c')
-rw-r--r--common/env.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/env.c b/common/env.c
index e8f841e..069c401 100644
--- a/common/env.c
+++ b/common/env.c
@@ -25,12 +25,12 @@ static char *var_name(struct variable_d *var)
return var->data;
}
-char *getenv (const char *name)
+const char *getenv (const char *name)
{
struct variable_d *var;
if (strchr(name, '.')) {
- char *ret = 0;
+ const char *ret = 0;
char *devstr = strdup(name);
char *par = strchr(devstr, '.');
struct device_d *dev;
@@ -109,7 +109,7 @@ int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
struct variable_d *var = env_list->next;
if (argc == 2) {
- char *val = getenv(argv[1]);
+ const char *val = getenv(argv[1]);
if (val) {
printf("%s=%s\n", argv[1], val);
return 0;