Use APR_STATUS_IS_... in some more cases.

While this is not strictly necessary everywhere, it makes it much easier
to find the problematic cases.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1102124 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2011-05-11 22:51:46 +00:00
parent d625ae4adb
commit 61a0413706
6 changed files with 10 additions and 10 deletions

View File

@ -1083,7 +1083,7 @@ static apr_status_t remove_directory(apr_pool_t *pool, const char *dir)
apr_finfo_t dirent;
rv = apr_dir_open(&dirp, dir, pool);
if (rv == APR_ENOENT) {
if (APR_STATUS_IS_ENOENT(rv)) {
return rv;
}
if (rv != APR_SUCCESS) {
@ -1193,7 +1193,7 @@ static apr_status_t find_directory(apr_pool_t *pool, const char *base,
remove = apr_pstrcat(pool, base, "/", header, NULL);
status = apr_file_remove(remove, pool);
if (status != APR_SUCCESS && status != APR_ENOENT) {
if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
char errmsg[120];
apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
remove, apr_strerror(status, errmsg, sizeof errmsg));
@ -1202,7 +1202,7 @@ static apr_status_t find_directory(apr_pool_t *pool, const char *base,
remove = apr_pstrcat(pool, base, "/", data, NULL);
status = apr_file_remove(remove, pool);
if (status != APR_SUCCESS && status != APR_ENOENT) {
if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
char errmsg[120];
apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
remove, apr_strerror(status, errmsg, sizeof errmsg));
@ -1210,7 +1210,7 @@ static apr_status_t find_directory(apr_pool_t *pool, const char *base,
}
status = remove_directory(pool, apr_pstrcat(pool, base, "/", vdir, NULL));
if (status != APR_SUCCESS && status != APR_ENOENT) {
if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
rv = status;
}
}