diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index fa85ad533..ba2081d1b 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -189,6 +189,8 @@ static const char *indenter(int i) | |||
189 | } | 189 | } |
190 | #define debug_printf_clean(...) fprintf(stderr, __VA_ARGS__) | 190 | #define debug_printf_clean(...) fprintf(stderr, __VA_ARGS__) |
191 | #define DEBUG_CLEAN 1 | 191 | #define DEBUG_CLEAN 1 |
192 | #else | ||
193 | #define DEBUG_CLEAN 0 | ||
192 | #endif | 194 | #endif |
193 | 195 | ||
194 | #if DEBUG_EXPAND | 196 | #if DEBUG_EXPAND |
@@ -2093,7 +2095,7 @@ static void restore_redirects(int squirrel[]) | |||
2093 | } | 2095 | } |
2094 | 2096 | ||
2095 | 2097 | ||
2096 | #if !defined(DEBUG_CLEAN) | 2098 | #if !DEBUG_CLEAN |
2097 | #define free_pipe_list(head, indent) free_pipe_list(head) | 2099 | #define free_pipe_list(head, indent) free_pipe_list(head) |
2098 | #define free_pipe(pi, indent) free_pipe(pi) | 2100 | #define free_pipe(pi, indent) free_pipe(pi) |
2099 | #endif | 2101 | #endif |
@@ -5637,6 +5639,7 @@ static int builtin_read(char **argv) | |||
5637 | { | 5639 | { |
5638 | char *string; | 5640 | char *string; |
5639 | const char *name = argv[1] ? argv[1] : "REPLY"; | 5641 | const char *name = argv[1] ? argv[1] : "REPLY"; |
5642 | //TODO: check that argv[1] is a valid variable name | ||
5640 | 5643 | ||
5641 | string = xmalloc_reads(STDIN_FILENO, xasprintf("%s=", name), NULL); | 5644 | string = xmalloc_reads(STDIN_FILENO, xasprintf("%s=", name), NULL); |
5642 | return set_local_var(string, 0, 0); | 5645 | return set_local_var(string, 0, 0); |