Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 47879 invoked from network); 20 Aug 2005 09:32:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Aug 2005 09:32:40 -0000 Received: (qmail 46915 invoked by uid 500); 20 Aug 2005 09:32:40 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 46800 invoked by uid 500); 20 Aug 2005 09:32:39 -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 46786 invoked by uid 99); 20 Aug 2005 09:32:39 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 20 Aug 2005 02:32:39 -0700 Received: (qmail 47845 invoked by uid 65534); 20 Aug 2005 09:32:39 -0000 Message-ID: <20050820093239.47844.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r234014 - /apr/apr/trunk/file_io/unix/readwrite.c Date: Sat, 20 Aug 2005 09:32:39 -0000 To: commits@apr.apache.org From: jorton@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jorton Date: Sat Aug 20 02:32:35 2005 New Revision: 234014 URL: http://svn.apache.org/viewcvs?rev=234014&view=rev Log: * file_io/unix/readwrite.c (apr_file_flush): Use apr_ssize_t to store the write() return value, remove casts. Modified: apr/apr/trunk/file_io/unix/readwrite.c Modified: apr/apr/trunk/file_io/unix/readwrite.c URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/unix/readwrite.c?rev=234014&r1=234013&r2=234014&view=diff ============================================================================== --- apr/apr/trunk/file_io/unix/readwrite.c (original) +++ apr/apr/trunk/file_io/unix/readwrite.c Sat Aug 20 02:32:35 2005 @@ -289,13 +289,13 @@ APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile) { if (thefile->buffered) { - apr_int64_t written = 0; - if (thefile->direction == 1 && thefile->bufpos) { + apr_ssize_t written; + do { written = write(thefile->filedes, thefile->buffer, thefile->bufpos); - } while (written == (apr_int64_t)-1 && errno == EINTR); - if (written == (apr_int64_t)-1) { + } while (written == -1 && errno == EINTR); + if (written == -1) { return errno; } thefile->filePtr += written;