From owner-freebsd-current@FreeBSD.ORG Mon Aug 21 07:19:46 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63AAD16A4DD for ; Mon, 21 Aug 2006 07:19:46 +0000 (UTC) (envelope-from thomas@FreeBSD.ORG) Received: from melamine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 060E343D55 for ; Mon, 21 Aug 2006 07:19:46 +0000 (GMT) (envelope-from thomas@FreeBSD.ORG) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 5F4665C560; Mon, 21 Aug 2006 09:19:45 +0200 (CEST) Date: Mon, 21 Aug 2006 09:19:45 +0200 From: Thomas Quinot To: Ricardo Nabinger Sanchez Message-ID: <20060821071945.GA75839@melamine.cuivre.fr.eu.org> References: <20060821002856.601c8dfd.rnsanchez@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060821002856.601c8dfd.rnsanchez@gmail.com> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.11 Cc: freebsd-current@freebsd.org Subject: Re: [RFC] (very) small ifmedia.c cleanup X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2006 07:19:46 -0000 * Ricardo Nabinger Sanchez, 2006-08-21 : > I was looking at src/sbin/ifconfig/ifmedia.c source, and noticed that the > handling of IFM_ETHER and IFM_ATM was identical. Also noticed the use of > goto that, IMHO, could be clearer if made with a plain if (), very similar > to the condition a few lines above each occurence of the gotos. Looks good to me. The more factoring, the merrier! I think you could even push things a little further and aggressively factor what can be factored between print_media_word and print_media_word_ifconfig. > Now I'm wondering if this diff looks good, as it is a first one I'm sending > over here. The send-pr(1) seemed to be just too much noise, but if that's > the correct way, please let me know. The diff is against -current. It never hurts to submit a PR, it helps keeping track of the discussion of a patch, the commit, and any possible subsequent action. Thomas.