diff options
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/subst.c b/Src/subst.c index 737a0a902..670f3f0c6 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -622,7 +622,7 @@ filesub(char **namptr, int assign) char * equalsubstr(char *str, int assign, int nomatch) { - char *pp, *cnam, *cmdstr, *ret; + char *pp, *cnam, *cmdstr; for (pp = str; !isend2(*pp); pp++) ; @@ -634,10 +634,10 @@ equalsubstr(char *str, int assign, int nomatch) zerr("%s not found", cmdstr); return NULL; } - ret = dupstring(cnam); if (*pp) - ret = dyncat(ret, pp); - return ret; + return dyncat(cnam, pp); + else + return cnam; /* already duplicated */ } /**/ |