httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r368505 - /httpd/httpd/trunk/server/request.c
Date Thu, 12 Jan 2006 22:51:01 GMT
Author: rooneg
Date: Thu Jan 12 14:51:00 2006
New Revision: 368505

URL: http://svn.apache.org/viewcvs?rev=368505&view=rev
Log:
Make some error checking more clear by using the defined constants instead
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.

Modified:
    httpd/httpd/trunk/server/request.c

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/request.c?rev=368505&r1=368504&r2=368505&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Thu Jan 12 14:51:00 2006
@@ -183,15 +183,15 @@
         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 @@
      * 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;
     }
 



Mime
View raw message