From owner-svn-src-head@FreeBSD.ORG Mon Oct 11 18:13:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19490106564A; Mon, 11 Oct 2010 18:13:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DC9988FC08; Mon, 11 Oct 2010 18:13:36 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 94C5346B0C; Mon, 11 Oct 2010 14:13:36 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AF3848A027; Mon, 11 Oct 2010 14:13:35 -0400 (EDT) From: John Baldwin To: Ivan Voras Date: Mon, 11 Oct 2010 10:23:26 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201010092020.o99KKSYW051470@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010111023.26220.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 11 Oct 2010 14:13:35 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.3 required=4.2 tests=BAYES_00,DATE_IN_PAST_03_06 autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, "Andrey V. Elsukov" , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r213662 - in head: sbin/geom/class/concat sbin/geom/class/eli sbin/geom/class/journal sbin/geom/class/mirror sbin/geom/class/part sbin/geom/class/raid3 sbin/geom/class/shsec sbin/geom/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 18:13:37 -0000 On Sunday, October 10, 2010 4:54:37 am Ivan Voras wrote: > On 9 October 2010 22:20, Andrey V. Elsukov wrote: > > Author: ae > > Date: Sat Oct 9 20:20:27 2010 > > New Revision: 213662 > > URL: http://svn.freebsd.org/changeset/base/213662 > > > > Log: > > Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1. > > Um, this looks like a pointless change and for the worse; Even at -O1 > the compiler will reduce strlen(constant) to just its result and for > code like printf("%d\n", sizeof("1234567")) produce code like: > > movl $7, %esi > movl $.LC0, %edi > movl $0, %eax > call printf > > And (though tastes differ) I think the sizeof() variant is less > readable. The strlen(_PATH_something) idiom is common in other parts > of the kernel outside GEOM. > > In short - why was this done? I agree, strlen("foo") is much clearer. -- John Baldwin