From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 13 06:40:35 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BF3116A4CE for ; Mon, 13 Sep 2004 06:40:35 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D80043D2D for ; Mon, 13 Sep 2004 06:40:35 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8D6eZ1Y046077 for ; Mon, 13 Sep 2004 06:40:35 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8D6eZbO046076; Mon, 13 Sep 2004 06:40:35 GMT (envelope-from gnats) Date: Mon, 13 Sep 2004 06:40:35 GMT Message-Id: <200409130640.i8D6eZbO046076@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Dan Lukes Subject: Re: bin/71628: [PATCH] cleanup of the usr.sbin/rpcbind code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 06:40:35 -0000 The following reply was made to PR bin/71628; it has been noted by GNATS. From: Dan Lukes To: Giorgos Keramidas Cc: alfred@freebsd.org, bug-followup@freebsd.org Subject: Re: bin/71628: [PATCH] cleanup of the usr.sbin/rpcbind code Date: Mon, 13 Sep 2004 08:33:19 +0200 Giorgos Keramidas wrote: > This initialization > char *foo = foo; > > is not cheaper than this one: > char *foo = NULL; Not true. The first one is optimized out by GCC even if O level is 0. Remember - it's hack/special construct (a special in-band way to tell the compiler something special) - it's not real assignment. Check it by your favorite disassembler. I did it. > This will catch possible bugs (current or future) in the rest of the code, so > it's a lot safer. I agree with it. Dan -- Dan Lukes, SISAL, MFF UK tel: +420 2 21914205, fax: +420 2 21914206 AKA: dan@obluda.cz, dan@freebsd.cz, dan@kolej.mff.cuni.cz, dan@fio.cz