]> granicus.if.org Git - php/commitdiff
Use SUCCESS/FAILURE
authorYasuo Ohgaki <yohgaki@php.net>
Mon, 18 Jan 2016 04:27:52 +0000 (13:27 +0900)
committerYasuo Ohgaki <yohgaki@php.net>
Mon, 18 Jan 2016 04:33:47 +0000 (13:33 +0900)
ext/session/session.c

index cbcd20d63abc55f7cd08a037e748f14f5b3c5309..c3ea950908fd16722b9333e2271a0a09f2269846 100644 (file)
@@ -1119,7 +1119,7 @@ static ps_serializer ps_serializers[MAX_SERIALIZERS + 1] = {
 
 PHPAPI int php_session_register_serializer(const char *name, int (*encode)(PS_SERIALIZER_ENCODE_ARGS), int (*decode)(PS_SERIALIZER_DECODE_ARGS)) /* {{{ */
 {
-       int ret = -1;
+       int ret = FAILURE;
        int i;
 
        for (i = 0; i < MAX_SERIALIZERS; i++) {
@@ -1128,7 +1128,7 @@ PHPAPI int php_session_register_serializer(const char *name, int (*encode)(PS_SE
                        ps_serializers[i].encode = encode;
                        ps_serializers[i].decode = decode;
                        ps_serializers[i + 1].name = NULL;
-                       ret = 0;
+                       ret = SUCCESS;
                        break;
                }
        }
@@ -1150,13 +1150,13 @@ static ps_module *ps_modules[MAX_MODULES + 1] = {
 
 PHPAPI int php_session_register_module(ps_module *ptr) /* {{{ */
 {
-       int ret = -1;
+       int ret = FAILURE;
        int i;
 
        for (i = 0; i < MAX_MODULES; i++) {
                if (!ps_modules[i]) {
                        ps_modules[i] = ptr;
-                       ret = 0;
+                       ret = SUCCESS;
                        break;
                }
        }