From: Garrett Rooney Date: Thu, 12 Jan 2006 22:51:00 +0000 (+0000) Subject: Make some error checking more clear by using the defined constants instead X-Git-Tag: 2.3.0~2617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=668a5863a73012175b9b4e30e54c0067d2c27160;p=thirdparty%2Fapache%2Fhttpd.git Make some error checking more clear by using the defined constants instead of literal values. Patch by: Dan Rall * server/request.c (ap_process_request_internal): Check the return value of hook functions against the constant OK instead of the magic number 0 to improve clarity. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@368505 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/request.c b/server/request.c index 40e9fbf9987..cbd3d18f9d9 100644 --- a/server/request.c +++ b/server/request.c @@ -183,15 +183,15 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r) r->ap_auth_type = r->prev->ap_auth_type; } else { - if ((access_status = ap_run_access_checker(r)) != 0) { + if ((access_status = ap_run_access_checker(r)) != OK) { return decl_die(access_status, "check access", r); } - if ((access_status = ap_run_check_user_id(r)) != 0) { + if ((access_status = ap_run_check_user_id(r)) != OK) { return decl_die(access_status, "check user", r); } - if ((access_status = ap_run_auth_checker(r)) != 0) { + if ((access_status = ap_run_auth_checker(r)) != OK) { return decl_die(access_status, "check authorization", r); } @@ -200,11 +200,11 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r) * in mod-proxy for r->proxyreq && r->parsed_uri.scheme * && !strcmp(r->parsed_uri.scheme, "http") */ - if ((access_status = ap_run_type_checker(r)) != 0) { + if ((access_status = ap_run_type_checker(r)) != OK) { return decl_die(access_status, "find types", r); } - if ((access_status = ap_run_fixups(r)) != 0) { + if ((access_status = ap_run_fixups(r)) != OK) { return access_status; }