rv = ap_read_pid(pconf, ap_pid_fname, &otherpid);
if (rv != APR_SUCCESS) {
- if (rv != APR_ENOENT) {
+ if (!APR_STATUS_IS_ENOENT(rv)) {
ap_log_error(APLOG_MARK, APLOG_STARTUP, rv, NULL,
"Error retrieving pid file %s", ap_pid_fname);
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
* buffer before finding the end-of-line. This is only going to
* happen if it exceeds the configured limit for a request-line.
*/
- if (rv == APR_ENOSPC) {
+ if (APR_STATUS_IS_ENOSPC(rv)) {
r->status = HTTP_REQUEST_URI_TOO_LARGE;
r->proto_num = HTTP_VERSION(1,0);
r->protocol = apr_pstrdup(r->pool, "HTTP/1.0");
else if (APR_STATUS_IS_TIMEUP(rv)) {
r->status = HTTP_REQUEST_TIME_OUT;
}
- else if (rv == APR_EINVAL) {
+ else if (APR_STATUS_IS_EINVAL(rv)) {
r->status = HTTP_BAD_REQUEST;
}
return 0;
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) {
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));
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));
}
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;
}
}