From owner-svn-src-all@FreeBSD.ORG Sun Oct 10 08:55:20 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 D09DD1065670; Sun, 10 Oct 2010 08:55:20 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 367ED8FC16; Sun, 10 Oct 2010 08:55:19 +0000 (UTC) Received: by qwe4 with SMTP id 4so934938qwe.13 for ; Sun, 10 Oct 2010 01:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=1juHwl7JvdUcGTCCDWxVXdHsYH9qvQ6LDyJFISLT+yA=; b=EiQpTySXFTCiA5e+LTwOgJlUuIu/KdoENK8KhfMJHpzyqQVJKzIFgdoQvsZVLYziwZ 8GVTDlCJGooaif33Cy70pPDmtccZP4vdNy8MI/8SBmBqcBnNg285JuUdIinx9p5PGe4a YfnFySZfh9IWeaNwMFbNBR0/swiUD0NZWRuVo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=apkPnYfs/OQWiXbcbIjCayMwx/2OvkLf+1fI5yTXpZau1eKo7VDe1LjxjHKQ5ItyRz MgrEL3OT4fyOzI3/LkgW+Ev2gwFQWxMgwRR1wha1OoEf9SflOe7cuXHU7D9rLkZJ1Gl4 xp8QHzU2nEl+MhVLFL/+rXdV3pu40D6tj9KBo= Received: by 10.229.89.75 with SMTP id d11mr3944821qcm.32.1286700918758; Sun, 10 Oct 2010 01:55:18 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.234.81 with HTTP; Sun, 10 Oct 2010 01:54:37 -0700 (PDT) In-Reply-To: <201010092020.o99KKSYW051470@svn.freebsd.org> References: <201010092020.o99KKSYW051470@svn.freebsd.org> From: Ivan Voras Date: Sun, 10 Oct 2010 10:54:37 +0200 X-Google-Sender-Auth: hYnKx8ESwepYZ3GRfhB5z7KJSTc Message-ID: To: "Andrey V. Elsukov" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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: Sun, 10 Oct 2010 08:55:20 -0000 On 9 October 2010 22:20, Andrey V. Elsukov wrote: > Author: ae > Date: Sat Oct =C2=A09 20:20:27 2010 > New Revision: 213662 > URL: http://svn.freebsd.org/changeset/base/213662 > > Log: > =C2=A0Replace 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?