diff options
Diffstat (limited to 'gcc/prefix.c')
-rw-r--r-- | gcc/prefix.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/prefix.c b/gcc/prefix.c index c07944764d4..1c96c58e54a 100644 --- a/gcc/prefix.c +++ b/gcc/prefix.c @@ -240,7 +240,7 @@ translate_name (name) char *name; { char code = name[0]; - char *key, *prefix; + char *key, *prefix = 0; int keylen; if (code != '@' && code != '$') @@ -268,11 +268,10 @@ translate_name (name) prefix = std_prefix; } else - { - prefix = getenv (key); - if (prefix == 0) - prefix = concat ("$", key, NULL_PTR); - } + prefix = getenv (key); + + if (prefix == 0) + prefix = PREFIX; /* Remove any trailing directory separator from what we got. */ if (prefix[strlen (prefix) - 1] == '/' |