apr_file_gets returns an apr_status_t not a char* and it returns
APR_SUCCESS when it reads something (which is 0).
Two of the cases were doing while apr_file_gets > 0 which would cause
it to loop when it returned APR_EOF. So, the valid check here is to
loop while we are receiving APR_SUCCESS.
Fix all of the other apr_file_gets to check APR_SUCCESS explicitly so
that it is obvious that we are checking an apr_status_t. Yes,
0 == APR_SUCCESS, but it obviously wasn't clear to someone what it
was returning.
Submitted by: Dale Ghent <daleg@elemental.org>,
Brian Pane <bpane@pacbell.net>
Reviewed by: Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91852 13f79535-47bb-0310-9956-ffa450edef68
Loading
Please sign in to comment