From: Jeff Trawick Date: Sat, 16 Nov 2013 12:13:39 +0000 (+0000) Subject: apr_file_write_full() simplification (like r1542413 and r1542416) X-Git-Tag: 2.5.0-alpha~4856 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b374da81a43be572c6a94b81a15d8f34c6436766;p=apache 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 --- diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 74f264315a..18714d718f 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -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; } }