diff options
author | Leo C | 2016-03-21 23:33:05 +0100 |
---|---|---|
committer | Leo C | 2016-03-21 23:33:05 +0100 |
commit | 1b77fa4e36e50258936a4b61fdb11a988d473b1a (patch) | |
tree | c9437a732dfcb31cc9272c079769d713fe946516 /avr/cli.c | |
parent | f3e47f679c5154908d3f869c1e9a4b5fcc29d4a5 (diff) | |
download | z180-stamp-1b77fa4e36e50258936a4b61fdb11a988d473b1a.zip |
Rename getenv() to getenv_char()
getenv() is declared in some avr-libc versions.
Diffstat (limited to 'avr/cli.c')
-rw-r--r-- | avr/cli.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -177,7 +177,7 @@ char *process_macros(char *input, char *output) if (c == '}') { /* Terminate variable name */ *(inp-1) = '\0'; - const char *envval = getenv(varname); + const char *envval = getenv_char(varname); *(inp-1) = '}'; /* Copy into the line if it exists */ if (envval != NULL) @@ -210,7 +210,7 @@ char *process_macros(char *input, char *output) * WARNING: * * We must create a temporary copy of the command since the command we get - * may be the result from getenv(), which returns a pointer directly to + * may be the result from getenv_char(), which returns a pointer directly to * the environment data, which may change magicly when the command we run * creates or modifies environment variables (like "bootp" does). * @@ -398,7 +398,7 @@ command_ret_t do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) for (i = 1; i < argc; ++i) { char *arg; - arg = getenv(argv[i]); + arg = getenv_char(argv[i]); if (arg == NULL) { printf_P(PSTR("## Error: \"%s\" is not set\n"), argv[i]); return CMD_RET_FAILURE; |