]> granicus.if.org Git - php/commitdiff
use SUCCESS/FAILURE instead of 0/-1
authorSascha Schumann <sas@php.net>
Sun, 9 Feb 2003 21:15:55 +0000 (21:15 +0000)
committerSascha Schumann <sas@php.net>
Sun, 9 Feb 2003 21:15:55 +0000 (21:15 +0000)
main/SAPI.c
sapi/apache/mod_php4.c
sapi/thttpd/thttpd.c

index ed0b0a21f56091ec9fc8ff66d26673ccdbe7a387..8e155733279a86c49a07f5ab3fe5d7b262100dd9 100644 (file)
@@ -856,7 +856,7 @@ SAPI_API int sapi_get_fd(int *fd TSRMLS_DC)
        if (sapi_module.get_fd) {
                return sapi_module.get_fd(fd TSRMLS_CC);
        } else {
-               return -1;
+               return FAILURE;
        }
 }
 
@@ -865,7 +865,7 @@ SAPI_API int sapi_force_http_10(TSRMLS_D)
        if (sapi_module.force_http_10) {
                return sapi_module.force_http_10(TSRMLS_C);
        } else {
-               return -1;
+               return FAILURE;
        }
 }
 
@@ -875,7 +875,7 @@ SAPI_API int sapi_get_target_uid(uid_t *obj TSRMLS_DC)
        if (sapi_module.get_target_uid) {
                return sapi_module.get_target_uid(obj TSRMLS_CC);
        } else {
-               return -1;
+               return FAILURE;
        }
 }
 
@@ -884,7 +884,7 @@ SAPI_API int sapi_get_target_gid(gid_t *obj TSRMLS_DC)
        if (sapi_module.get_target_gid) {
                return sapi_module.get_target_gid(obj TSRMLS_CC);
        } else {
-               return -1;
+               return FAILURE;
        }
 }
 
index 0803edef4a392c08555ff7952d5c4d8024cf57ab..9f3d7444ddef374ec0ee95085d2aea022c437372 100644 (file)
@@ -355,9 +355,9 @@ static int sapi_apache_get_fd(int *nfd TSRMLS_DC)
        
        if (fd >= 0) {
                if (nfd) *nfd = fd;
-               return 0;
+               return SUCCESS;
        }
-       return -1;
+       return FAILURE;
 }
 /* }}} */
 
@@ -369,7 +369,7 @@ static int sapi_apache_force_http_10(TSRMLS_D)
        
        r->proto_num = HTTP_VERSION(1,0);
        
-       return 0;
+       return SUCCESS;
 }
 
 /* {{{ sapi_apache_get_target_uid
@@ -377,7 +377,7 @@ static int sapi_apache_force_http_10(TSRMLS_D)
 static int sapi_apache_get_target_uid(uid_t *obj TSRMLS_DC)
 {
        *obj = ap_user_id;
-       return 0;
+       return SUCCESS;
 }
 
 /* {{{ sapi_apache_get_target_gid
@@ -385,7 +385,7 @@ static int sapi_apache_get_target_uid(uid_t *obj TSRMLS_DC)
 static int sapi_apache_get_target_gid(gid_t *obj TSRMLS_DC)
 {
        *obj = ap_group_id;
-       return 0;
+       return SUCCESS;
 }
 
 /* {{{ sapi_module_struct apache_sapi_module
index ae46df350912bab5dbb88f3080bce6188551b49d..30d1cea79885dafa37e650446a20bad464e3d73c 100644 (file)
@@ -349,7 +349,7 @@ static int php_thttpd_startup(sapi_module_struct *sapi_module)
 static int sapi_thttpd_get_fd(int *nfd TSRMLS_DC)
 {
        if (nfd) *nfd = TG(hc)->conn_fd;
-       return 0;
+       return SUCCESS;
 }
 
 static sapi_module_struct thttpd_sapi_module = {