Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 39137 invoked from network); 3 Oct 2006 07:29:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Oct 2006 07:29:18 -0000 Received: (qmail 40720 invoked by uid 500); 3 Oct 2006 07:29:11 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 40651 invoked by uid 500); 3 Oct 2006 07:29:11 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 40640 invoked by uid 99); 3 Oct 2006 07:29:11 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Oct 2006 00:29:11 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [130.239.18.156] ([130.239.18.156:43437] helo=mail.acc.umu.se) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 83/29-29668-01112254 for ; Tue, 03 Oct 2006 00:28:21 -0700 Received: from localhost (localhost [127.0.0.1]) by amavisd-new (Postfix) with ESMTP id 5D89B76 for ; Tue, 3 Oct 2006 09:27:00 +0200 (MEST) Received: by mail.acc.umu.se (Postfix, from userid 12143) id 9778F7A; Tue, 3 Oct 2006 09:26:59 +0200 (MEST) Received: from localhost (localhost [127.0.0.1]) by mail.acc.umu.se (Postfix) with ESMTP id 94BA776 for ; Tue, 3 Oct 2006 09:26:59 +0200 (MEST) Date: Tue, 3 Oct 2006 09:26:59 +0200 (MEST) From: Niklas Edmundsson To: dev@httpd.apache.org Subject: Re: Coding style In-Reply-To: <7edfeeef0610021159x152f3d8cu6e3c3234739c11c3@mail.gmail.com> Message-ID: References: <200610021956.50910.nick@webthing.com> <7edfeeef0610021159x152f3d8cu6e3c3234739c11c3@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: amavisd-new at acc.umu.se X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Mon, 2 Oct 2006, Garrett Rooney wrote: > Or the even more readable: > > rv = do_something(args); > if (rv == APR_SUCCESS) { > > } +1 for simple code like this. It comes naturally when you need to do stuff like rv = dostuff(...); if(rv != APR_SUCCESS && rv != whatever) { ... and is also less likely to cause ugly linewraps when using functions_with_long_names(and, a, large, list, of, arguments) ... /Nikke -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | nikke@acc.umu.se --------------------------------------------------------------------------- Sexy: Uses feather. Kinky: Uses entire chicken. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=