diff options
author | Paul Smith <psmith@gnu.org> | 2003-01-30 06:21:36 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2003-01-30 06:21:36 +0000 |
commit | b7c728046e3f32cd93b04fa4a19a69cf6135e6e4 (patch) | |
tree | 21f7a6b69cfdf22223052f65fa76fe05946110c5 /expand.c | |
parent | d33ff301454fa1db9919674dbc2a37309bbd529f (diff) | |
download | gunmake-b7c728046e3f32cd93b04fa4a19a69cf6135e6e4.tar.gz |
Enhancement (bug #2407) Make error messages more clear.
Diffstat (limited to 'expand.c')
-rw-r--r-- | expand.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -411,7 +411,7 @@ variable_expand (char *line) variable-expansion that is in progress. */ char * -expand_argument (char *str, char *end) +expand_argument (const char *str, const char *end) { char *tmp; @@ -419,13 +419,11 @@ expand_argument (char *str, char *end) return xstrdup(""); if (!end || *end == '\0') - tmp = str; - else - { - tmp = (char *) alloca (end - str + 1); - bcopy (str, tmp, end - str); - tmp[end - str] = '\0'; - } + return allocated_variable_expand ((char *)str); + + tmp = (char *) alloca (end - str + 1); + bcopy (str, tmp, end - str); + tmp[end - str] = '\0'; return allocated_variable_expand (tmp); } |