Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 15102 invoked from network); 27 Dec 2004 17:41:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Dec 2004 17:41:17 -0000 Received: (qmail 47265 invoked by uid 500); 27 Dec 2004 17:40:38 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 47169 invoked by uid 500); 27 Dec 2004 17:40:37 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 47051 invoked by uid 99); 27 Dec 2004 17:40:36 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of mihailim@gmail.com designates 64.233.170.199 as permitted sender) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=bxHmxQBstK/vsI4qjQwBanpWCyfc8UhxmcL/HSkJg6rkgQOMTLcLGxUvzoGOCIV7uSYXdWtf7Agh/t/z50KfRFNLK/zK62gZa9S9i0giePQWUJm4IYF+0U0dJC6fdd2czLxQc2+pr7lel2hM5kF6wCj4MyRf7PksvVVueOztj88= Message-ID: Date: Mon, 27 Dec 2004 19:40:30 +0200 From: Mihai Limbasan Reply-To: Mihai Limbasan To: Garrett Rooney Subject: Re: apr_status_t testing against APR_SUCCESS usage question Cc: Cliff Woolley , dev@apr.apache.org In-Reply-To: <41D047CA.6040600@electricjellyfish.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <41D01FB6.2040605@electricjellyfish.net> <41D047CA.6040600@electricjellyfish.net> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Check, I hear you. I'll split it tomorrow then (tired right now and working while tired is a no-no) and resubmit the positive-success-report version. On Mon, 27 Dec 2004 12:35:06 -0500, Garrett Rooney wrote: > Ok, I think we may be talking about two different cases... > > There's the "check if a call returned an error, and if so return that to > your caller" case, which personally I think is easist to read as: > > if (rv) > return rv; > > If there is an error, we return it, the code does exactly what you would > read out loud if you were reading it to someone. In Subversion land we > make it even more explicit by using 'err' or 'apr_err' for the variable > holding the status, instead of rv, but even without that it's still more > readable this way IMO. > > And there's the "check if a call succeeded, and if so return that to > your caller" case, which I'm not all that picky about. Perhaps > including APR_SUCCESS there in some manner is probably best, as it makes > it clear that we're looking for success. > > The patch seems to deal with both situations, and in the first case I > just don't see how it helps other than making things more verbose when > there's little need. > > -garrett > -- Mihai Limbasan