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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to