Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 2010 18:18:59 +0100 (CET)
From:      Harti Brandt <hartmut.brandt@dlr.de>
To:        Andrey Chernov <ache@nagual.pp.ru>
Cc:        svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG
Subject:   Re: svn commit: r202070 - head/usr.bin/make
Message-ID:  <20100111181634.H12211@beagle.kn.op.dlr.de>
In-Reply-To: <20100111124059.GA57742@nagual.pp.ru>
References:  <201001110916.o0B9Gg1A012733@svn.freebsd.org> <20100111124059.GA57742@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Mon, 11 Jan 2010, Andrey Chernov wrote:

AC>On Mon, Jan 11, 2010 at 09:16:42AM +0000, Hartmut Brandt wrote:
AC>> @@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *prev
AC>>  		} else {
AC>>  			fprintf(stdout, "Remaking `%s'\n", gn->name);
AC>>  			fflush(stdout);
AC>> -			if ((tdir = getenv("TMPDIR")) == NULL)
AC>> -				tdir = TMPDIR;
AC>>  			snprintf(job->outFile, sizeof(job->outFile), "%s/%s",
AC>>  			    tdir, TMPPAT);
AC>>  			if ((job->outFd = mkstemp(job->outFile)) == -1)
AC>
AC>With the presence of .EXPORTVAR directive (setenv() called) TMPDIR 
AC>environment can be changed on the fly, so perhaps this lines are for reason.

There is the same getenv() just a couple of lines above of all the if()s 
so that it covers both uses of tdir. I just though that doing the getenv() 
in both places is slightly more performing that do it all the time. But 
decided that this gain would be clearly below noise level. The I forgot to 
remove the now unneeded second getenv.

harti



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100111181634.H12211>