From dev-return-19974-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed Apr 30 01:41:58 2008 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 2436 invoked from network); 30 Apr 2008 01:41:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2008 01:41:57 -0000 Received: (qmail 89297 invoked by uid 500); 30 Apr 2008 01:41:58 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 89258 invoked by uid 500); 30 Apr 2008 01:41:58 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 89247 invoked by uid 99); 30 Apr 2008 01:41:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Apr 2008 18:41:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cesarbs@gmail.com designates 209.85.200.174 as permitted sender) Received: from [209.85.200.174] (HELO wf-out-1314.google.com) (209.85.200.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 01:41:14 +0000 Received: by wf-out-1314.google.com with SMTP id 25so199701wfc.22 for ; Tue, 29 Apr 2008 18:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=lG7xlk8gRf/vi+9GhT7yAejOURwuJ9mAPtBWdFGUQuc=; b=U4S6brjPr0koTePBySttMOua8EIs02/6duWoBz/anmhMcjetXGMUrgoZJolvFo56+Ph/oWs+Z3JP3VAZEWBkKvBo5AQjxK0O23Q3VK3dbEqbSGkqPb/02LSoKfYob/TNPoQabm90SitgcAW20LJyQ6G8EWCUtadwPE18JU+mi2E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=vYasy6eSDo4k+CKW3Ktp7pDRdsGBXMvJxTV1OsFjjVqcZ850fDaxmScCPdFncXCB7JslxRnCahOxFhFurAou5krVpVU0sH2UGIWjN37SSR+4cPAaeaL7DaXhyAwME4ulDksHqJQlTNBfTiwrEP8iqfjmjtzyEtnJu4vSQCAIe2c= Received: by 10.142.171.6 with SMTP id t6mr69185wfe.12.1209519688737; Tue, 29 Apr 2008 18:41:28 -0700 (PDT) Received: by 10.142.224.21 with HTTP; Tue, 29 Apr 2008 18:41:28 -0700 (PDT) Message-ID: Date: Tue, 29 Apr 2008 22:41:28 -0300 From: "=?ISO-8859-1?Q?C=E9sar_Leonardo_Blum_Silveira?=" To: dev@apr.apache.org Subject: Re: Patch for passing NULL as value argument to apr_env_get In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org I'm really sorry if this is annoying, but no one gave any feedback on this. Hasn't anyone liked the idea? Or maybe I should log this on bugzilla? Thank you, --=20 C=E9sar L. B. Silveira On Fri, Apr 25, 2008 at 1:24 PM, C=E9sar Leonardo Blum Silveira wrote: > Hello, > > Some time ago I wrote a piece of code which only needed to check > whether and environment variable was defined. Since I did not care > about the value the variable contained, I was a little annoyed by the > fact that I had to declare a variable only to pass it as the value > argument to apr_env_get. So I decided to modify the source in order to > only set the value variable when it is passed, i.e. is not NULL. > > I see this is somewhat contrary to what the guidelines say, "One > notable standard that has been adopted within APR functions (and is > partly due to APR's httpd lineage) is that the input values do not > need to be checked for correctness.". However, I still think my > modification might be useful to other people. > > Attached is the patch file. This is the first patch I ever made for > APR, so I don't know if it is precisely correct. Please review the > filenames in it. > > Regards, > > -- > C=E9sar L. B. Silveira >