From owner-cvs-all Thu Mar 7 3:32:18 2002 Delivered-To: cvs-all@freebsd.org Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by hub.freebsd.org (Postfix) with ESMTP id 0E85737B405; Thu, 7 Mar 2002 03:31:54 -0800 (PST) Received: from beagle (beagle [193.175.132.100]) by mailhub.fokus.gmd.de (8.11.6/8.11.6) with ESMTP id g27BVgR21043; Thu, 7 Mar 2002 12:31:42 +0100 (MET) Date: Thu, 7 Mar 2002 12:31:41 +0100 (CET) From: Harti Brandt To: Will Andrews Cc: "David O'Brien" , Mark Murray , , Subject: Re: cvs commit: src/usr.bin/rwall rwall.c In-Reply-To: <20020307111707.GK53073@squall.waterspout.com> Message-ID: <20020307122950.H99061-100000@beagle.fokus.gmd.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 7 Mar 2002, Will Andrews wrote: WA>On Thu, Mar 07, 2002 at 03:02:44AM -0800, David O'Brien wrote: WA>> - if ((fd = mkstemp(tmpname)) == -1 || !(fp = fdopen(fd, "r+"))) WA>> + fd = mkstemp(tmpname); WA>> + fp = fdopen(fd, "r+"); WA>> + if (fd == -1 || !fp) WA>> WA>> Why did you need to do such code restructuring? WA> WA>In my opinion, the above change makes the code clearer. The WA>previous construct obfuscates the logic. For each medium-experienced C-programmer the one-liner is far faster and easier to read and understand. Are we going to rewrite everything in Pascal? harti -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fhg.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message