summaryrefslogtreecommitdiff
path: root/expand.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2003-01-30 06:21:36 +0000
committerPaul Smith <psmith@gnu.org>2003-01-30 06:21:36 +0000
commitb7c728046e3f32cd93b04fa4a19a69cf6135e6e4 (patch)
tree21f7a6b69cfdf22223052f65fa76fe05946110c5 /expand.c
parentd33ff301454fa1db9919674dbc2a37309bbd529f (diff)
downloadgunmake-b7c728046e3f32cd93b04fa4a19a69cf6135e6e4.tar.gz
Enhancement (bug #2407) Make error messages more clear.
Diffstat (limited to 'expand.c')
-rw-r--r--expand.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/expand.c b/expand.c
index ac4ccda..922b1e3 100644
--- a/expand.c
+++ b/expand.c
@@ -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);
}