summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/basic_functions.c12
-rw-r--r--ext/standard/fsock.c5
-rw-r--r--ext/standard/fsock.h2
-rw-r--r--ext/standard/reg.c5
4 files changed, 10 insertions, 14 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index a8b1d4dc42..594a588097 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -69,7 +69,7 @@ typedef struct _php_shutdown_function_entry {
} php_shutdown_function_entry;
/* some prototypes for local functions */
-static int user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry);
+static void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry);
pval test_class_get_property(zend_property_reference *property_reference);
int test_class_set_property(zend_property_reference *property_reference, pval *value);
void test_class_call_function(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
@@ -326,7 +326,7 @@ zend_module_entry basic_functions_module = {
#if defined(HAVE_PUTENV)
-static int php_putenv_destructor(putenv_entry *pe)
+static void php_putenv_destructor(putenv_entry *pe)
{
if (pe->previous_value) {
putenv(pe->previous_value);
@@ -346,7 +346,6 @@ static int php_putenv_destructor(putenv_entry *pe)
}
efree(pe->putenv_string);
efree(pe->key);
- return 1;
}
#endif
@@ -405,7 +404,7 @@ PHP_RINIT_FUNCTION(basic)
BG(page_inode) = -1;
BG(page_mtime) = -1;
#ifdef HAVE_PUTENV
- if (zend_hash_init(&BG(putenv_ht), 1, NULL, (int (*)(void *)) php_putenv_destructor, 0) == FAILURE) {
+ if (zend_hash_init(&BG(putenv_ht), 1, NULL, (void (*)(void *)) php_putenv_destructor, 0) == FAILURE) {
return FAILURE;
}
#endif
@@ -986,7 +985,7 @@ PHP_FUNCTION(call_user_method)
}
-int user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry)
+void user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry)
{
pval retval;
int i;
@@ -999,7 +998,6 @@ int user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_e
zval_ptr_dtor(&shutdown_function_entry->arguments[i]);
}
efree(shutdown_function_entry->arguments);
- return 1;
}
@@ -1034,7 +1032,7 @@ PHP_FUNCTION(register_shutdown_function)
convert_to_string(shutdown_function_entry.arguments[0]);
if (!BG(user_shutdown_function_names)) {
BG(user_shutdown_function_names) = (HashTable *) emalloc(sizeof(HashTable));
- zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (int (*)(void *))user_shutdown_function_dtor, 0);
+ zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *))user_shutdown_function_dtor, 0);
}
for (i=0; i<shutdown_function_entry.arg_count; i++) {
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 60ff1a3dc9..eb7f173e8d 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -752,17 +752,16 @@ size_t php_sock_fread(char *ptr, size_t size, int socket)
/* {{{ module start/shutdown functions */
/* {{{ php_msock_destroy */
-int php_msock_destroy(int *data)
+void php_msock_destroy(int *data)
{
close(*data);
- return 1;
}
/* }}} */
static void fsock_globals_ctor(FLS_D)
{
zend_hash_init(&FG(ht_fsock_keys), 0, NULL, NULL, 1);
- zend_hash_init(&FG(ht_fsock_socks), 0, NULL, (int (*)(void *))php_msock_destroy, 1);
+ zend_hash_init(&FG(ht_fsock_socks), 0, NULL, (void (*)(void *))php_msock_destroy, 1);
FG(def_chunk_size) = CHUNK_SIZE;
FG(phpsockbuf) = NULL;
}
diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h
index 4bebecb09c..24bbef6810 100644
--- a/ext/standard/fsock.h
+++ b/ext/standard/fsock.h
@@ -71,7 +71,7 @@ void php_sockset_timeout(int socket, struct timeval *timeout);
int php_sockdestroy(int socket);
int php_sock_close(int socket);
size_t php_sock_set_def_chunk_size(size_t size);
-int php_msock_destroy(int *data);
+void php_msock_destroy(int *data);
PHPAPI int connect_nonb(int sockfd, struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
diff --git a/ext/standard/reg.c b/ext/standard/reg.c
index 421d1f802b..bed5eec901 100644
--- a/ext/standard/reg.c
+++ b/ext/standard/reg.c
@@ -86,10 +86,9 @@ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
return r;
}
-static int _free_reg_cache(reg_cache *rc)
+static void _free_reg_cache(reg_cache *rc)
{
regfree(&rc->preg);
- return 1;
}
#undef regfree
@@ -99,7 +98,7 @@ static int _free_reg_cache(reg_cache *rc)
static void php_reg_init_globals(php_reg_globals *reg_globals)
{
- zend_hash_init(&reg_globals->ht_rc, 0, NULL, (int (*)(void *)) _free_reg_cache, 1);
+ zend_hash_init(&reg_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1);
}
static PHP_MINIT_FUNCTION(regex)