From owner-freebsd-hackers@FreeBSD.ORG Fri May 1 20:42:04 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1743D1065674 for ; Fri, 1 May 2009 20:42:04 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id F1F118FC08 for ; Fri, 1 May 2009 20:42:02 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 01 May 2009 20:42:01 -0000 Received: from p54A3F073.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.240.115] by mail.gmx.net (mp007) with SMTP; 01 May 2009 22:42:01 +0200 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/rvwYjDGbrP/u4Pf8nMdr3QZjyTZJmhH/DJ4yNSU cymcOUefHcYr9P Message-ID: <49FB5E99.5070004@gmx.de> Date: Fri, 01 May 2009 22:42:01 +0200 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.21 (X11/20090412) MIME-Version: 1.0 To: Julian Elischer References: <49F4070C.2000108@gmx.de> <20090428114754.GB89235@server.vk2pj.dyndns.org> <20090430.090226.1569754707.imp@bsdimp.com> <49FA8D73.6040207@gmx.de> <49FAB322.9030103@elischer.org> <5f67a8c40905011324s2ad5e02dy47c73ae950845b54@mail.gmail.com> <49FB5C57.6050407@gmx.de> <49FB5DB3.9030200@elischer.org> In-Reply-To: <49FB5DB3.9030200@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 Cc: freebsd-hackers@freebsd.org, Zaphod Beeblebrox Subject: Re: C99: Suggestions for style(9) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 20:42:04 -0000 Julian Elischer schrieb: > Christoph Mallon wrote: > >> >> You are mistaken. Re-read the "if": It already contains a "return;" as >> then-part. The declaration of "bp" has no relation to the "if". >> In fact this is very good: "bp" can only be used after the "if", >> because it is declared after it. Further, it most probably is only >> assigned a value once, so declaration and the signle assignment are in >> the same place, which aids readability and makes the code more concise. > > the fact that people misread it allows me to say > > "the defense rests m'lord" Non sequitur. Warner wrote the "return;" in the same line as the if, which easily hides it. If the "return;" wasn't there, the original statement would be almost correct - actually it would be a compile error, because if (x) int i; is not allowed[1]. Christoph [1] if (x) { int i; } is allowed, of course.