Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 32979 invoked from network); 3 Oct 2005 11:59:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Oct 2005 11:59:13 -0000 Received: (qmail 96305 invoked by uid 500); 3 Oct 2005 11:59:10 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 96281 invoked by uid 500); 3 Oct 2005 11:59:10 -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 96265 invoked by uid 99); 3 Oct 2005 11:59:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2005 04:59:10 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jorton@redhat.com designates 66.187.233.31 as permitted sender) Received: from [66.187.233.31] (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2005 04:59:14 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j93BwlHo007509 for ; Mon, 3 Oct 2005 07:58:47 -0400 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j93BwkV23503 for ; Mon, 3 Oct 2005 07:58:47 -0400 Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.4/8.13.4/Submit) id j93BwkKi014107 for dev@httpd.apache.org; Mon, 3 Oct 2005 12:58:46 +0100 Date: Mon, 3 Oct 2005 12:58:45 +0100 From: Joe Orton To: dev@httpd.apache.org Subject: Re: svn commit: r293305 - in /httpd/httpd/branches/2.2.x/modules: dav/fs/dbm.c Message-ID: <20051003115845.GF6219@redhat.com> Mail-Followup-To: dev@httpd.apache.org References: <200510031150.j93Boh700945@devsys.jaguNET.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <200510031150.j93Boh700945@devsys.jaguNET.com> User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Mon, Oct 03, 2005 at 07:50:39AM -0400, Jim Jagielski wrote: > Just some lines that caught my eye: > > > > > - *context = (void *)(value == 'T'); > > + *context = (void *)((long)(value == 'T')); > > > > - int value = context != NULL; > > + long value = context != NULL; > > apr_fileperms_t perms = resource->info->finfo.protection; > > - int old_value = (perms & APR_UEXECUTE) != 0; > > + long old_value = (perms & APR_UEXECUTE) != 0; > > > > Huh? Whenever I see conditionals cast to (long) I get > suspicious. These are all cases where an integer is stored in a pointer; it's safe to assume that a long will fit in a pointer on all platforms which httpd runs on as a practical consideration, and using a cast to long rather than a cast to int will avoid compiler warnings on LP64 platforms. joe