From owner-svn-src-all@FreeBSD.ORG Mon Jan 11 17:31:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6AD11065672; Mon, 11 Jan 2010 17:31:08 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp1.dlr.de (smtp1.dlr.de [129.247.252.32]) by mx1.freebsd.org (Postfix) with ESMTP id 67B978FC15; Mon, 11 Jan 2010 17:31:08 +0000 (UTC) Received: from beagle.kn.op.dlr.de ([129.247.178.136]) by smtp1.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 11 Jan 2010 18:19:03 +0100 Date: Mon, 11 Jan 2010 18:18:59 +0100 (CET) From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Andrey Chernov In-Reply-To: <20100111124059.GA57742@nagual.pp.ru> Message-ID: <20100111181634.H12211@beagle.kn.op.dlr.de> References: <201001110916.o0B9Gg1A012733@svn.freebsd.org> <20100111124059.GA57742@nagual.pp.ru> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 11 Jan 2010 17:19:03.0236 (UTC) FILETIME=[2C066040:01CA92E2] Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r202070 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 17:31:08 -0000 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