mirror of
https://github.com/apache/httpd.git
synced 2025-08-05 16:55:50 +03:00
apr_file_write_full() simplification (like r1542413 and r1542416)
hopefully I sidestepped the surprising conflation of OK/APR_SUCCESS in this code git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542493 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -229,7 +229,6 @@ static apr_status_t lua_write_body(request_rec *r, apr_file_t *file, apr_off_t *
|
||||
len_read,
|
||||
rpos = 0;
|
||||
apr_off_t length = r->remaining;
|
||||
apr_size_t written;
|
||||
|
||||
*size = length;
|
||||
while ((len_read =
|
||||
@@ -241,9 +240,9 @@ static apr_status_t lua_write_body(request_rec *r, apr_file_t *file, apr_off_t *
|
||||
rsize = len_read;
|
||||
|
||||
rc = apr_file_write_full(file, argsbuffer, (apr_size_t) rsize,
|
||||
&written);
|
||||
if (written != rsize || rc != OK)
|
||||
return APR_ENOSPC;
|
||||
NULL);
|
||||
if (rc != APR_SUCCESS)
|
||||
return rc;
|
||||
rpos += rsize;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user