git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89715
13f79535-47bb-0310-9956-
ffa450edef68
static void do_emit_plain(request_rec *r, apr_file_t *f)
{
char buf[AP_IOBUFSIZE + 1];
- int i, c, ch;
- apr_size_t n;
+ int ch;
+ apr_size_t i, c, n;
apr_status_t stat;
ap_rputs("<PRE>\n", r);
stat = apr_file_read(f, buf, &n);
}
while (stat != APR_SUCCESS && APR_STATUS_IS_EINTR(stat));
- if (n == -1 || n == 0) {
+ if (n == 0 || stat != APR_SUCCESS) {
+ /* ###: better error here? */
break;
}
buf[n] = '\0';