]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make some error checking more clear by using the defined constants instead
authorGarrett Rooney <rooneg@apache.org>
Thu, 12 Jan 2006 22:51:00 +0000 (22:51 +0000)
committerGarrett Rooney <rooneg@apache.org>
Thu, 12 Jan 2006 22:51:00 +0000 (22:51 +0000)
of literal values.

Patch by: Dan Rall <dlr apache.org>

* 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

server/request.c

index 40e9fbf998749860d768774a31dfd17da66204d2..cbd3d18f9d990c19664a781a7e17b87ad809eb5a 100644 (file)
@@ -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;
     }