apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r234014 - /apr/apr/trunk/file_io/unix/readwrite.c
Date Sat, 20 Aug 2005 09:32:39 GMT
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;



Mime
View raw message