Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 39031 invoked from network); 14 Oct 2007 19:12:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Oct 2007 19:12:56 -0000 Received: (qmail 10597 invoked by uid 500); 14 Oct 2007 19:12:44 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 10561 invoked by uid 500); 14 Oct 2007 19:12:44 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 10550 invoked by uid 99); 14 Oct 2007 19:12:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Oct 2007 12:12:44 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Oct 2007 19:12:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A4EEA1A9832; Sun, 14 Oct 2007 12:12:35 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r584582 - /apr/apr/branches/1.2.x/file_io/win32/seek.c Date: Sun, 14 Oct 2007 19:12:35 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071014191235.A4EEA1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wrowe Date: Sun Oct 14 12:12:34 2007 New Revision: 584582 URL: http://svn.apache.org/viewvc?rev=584582&view=rev Log: Here is the correct cast for signed-ness where size_t is off_t bytes long, while size_t is unsigned and off_t is usually signed. This is true of Windows/x64 This solves the emit without causing truncation, we have the assumption that off_t can't possibly be smaller than size_t (or how would one have a swapfile :) Modified: apr/apr/branches/1.2.x/file_io/win32/seek.c Modified: apr/apr/branches/1.2.x/file_io/win32/seek.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/file_io/win32/seek.c?rev=584582&r1=584581&r2=584582&view=diff ============================================================================== --- apr/apr/branches/1.2.x/file_io/win32/seek.c (original) +++ apr/apr/branches/1.2.x/file_io/win32/seek.c Sun Oct 14 12:12:34 2007 @@ -39,7 +39,7 @@ */ newbufpos = pos - (thefile->filePtr - thefile->dataRead); - if (newbufpos >= 0 && newbufpos <= thefile->dataRead) { + if (newbufpos >= 0 && newbufpos <= (apr_off_t)thefile->dataRead) { thefile->bufpos = (apr_size_t)newbufpos; rv = APR_SUCCESS; } else {