summaryrefslogtreecommitdiff
path: root/dmake
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-05-16 12:58:34 +0200
committerDavid Tardon <dtardon@redhat.com>2011-05-16 15:37:30 +0200
commite99d6e62f9d9b64fe0b5ef5b9f545e25b727118a (patch)
treef94fac01479334e3c656e6fa9a084f54387f5fa1 /dmake
parentc03eb3eefb503a028a0d073e3573a0821e7a05b0 (diff)
dir is always copied--free unconditionally
Diffstat (limited to 'dmake')
-rw-r--r--dmake/make.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/dmake/make.c b/dmake/make.c
index ad7f4171435f..2f9a9b1b6022 100644
--- a/dmake/make.c
+++ b/dmake/make.c
@@ -1520,7 +1520,6 @@ char *name;
int ignore;
{
STRINGPTR new_dir;
- int freedir=FALSE;
DB_ENTER( "Push_dir" );
@@ -1528,12 +1527,9 @@ int ignore;
if( *dir == '\'' && dir[strlen(dir)-1] == '\'' ) {
dir = DmStrDup(dir+1);
dir[strlen(dir)-1]='\0';
- freedir=TRUE;
}
- else if (strchr(dir,'$') != NIL(char)) {
+ else if (strchr(dir,'$') != NIL(char))
dir = Expand(dir);
- freedir=TRUE;
- }
else
dir = DmStrDup(dir);
@@ -1541,7 +1537,7 @@ int ignore;
if( !ignore )
Fatal( "Unable to change to directory `%s', target is [%s]",
dir, name );
- if (freedir) FREE(dir);
+ FREE(dir);
DB_RETURN( 0 );
}
@@ -1549,7 +1545,7 @@ int ignore;
if( Verbose & V_DIR_SET )
printf( "%s: Changed to directory [%s]\n", Pname, dir );
- if (freedir) FREE( dir );
+ FREE( dir );
TALLOC( new_dir, 1, STRING );
new_dir->st_next = dir_stack;
dir_stack = new_dir;