summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_wait.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_wait.c')
-rw-r--r--sapi/phpdbg/phpdbg_wait.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c
index 856f6e2b3e..c7dcd4fbd4 100644
--- a/sapi/phpdbg/phpdbg_wait.c
+++ b/sapi/phpdbg/phpdbg_wait.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#include "ext/standard/php_var.h"
#include "ext/standard/basic_functions.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
static void phpdbg_rebuild_http_globals_array(int type, const char *name) {
zval *zvp;
@@ -50,7 +50,7 @@ typedef struct {
static int phpdbg_array_data_compare(const void *a, const void *b) {
Bucket *f, *s;
- zval result;
+ int result;
zval *first, *second;
f = *((Bucket **) a);
@@ -59,13 +59,11 @@ static int phpdbg_array_data_compare(const void *a, const void *b) {
first = &f->val;
second = &s->val;
- if (string_compare_function(&result, first, second) == FAILURE) {
- return 0;
- }
+ result = string_compare_function(first, second);
- if (Z_LVAL(result) < 0) {
+ if (result < 0) {
return -1;
- } else if (Z_LVAL(result) > 0) {
+ } else if (result > 0) {
return 1;
}
@@ -233,7 +231,7 @@ void phpdbg_webdata_decompress(char *msg, int len) {
} else if (mode > 0) {
// not loaded module
if (!sapi_module.name || strcmp(sapi_module.name, Z_STRVAL_P(module))) {
- phpdbg_notice("wait", "missingmodule=\"%.*s\"", "The module %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/module/%.*s.so", Z_STRLEN_P(module), Z_STRVAL_P(module), Z_STRLEN_P(module), Z_STRVAL_P(module));
+ phpdbg_notice("wait", "missingmodule=\"%.*s\"", "The module %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/module/%.*s.so", (int) Z_STRLEN_P(module), Z_STRVAL_P(module), (int) Z_STRLEN_P(module), Z_STRVAL_P(module));
}
}
} while (module);
@@ -283,18 +281,13 @@ void phpdbg_webdata_decompress(char *msg, int len) {
pefree(elm, zend_extensions.persistent);
zend_extensions.count--;
} else {
-/* zend_hash_get_current_key_zval_ex(Z_ARRVAL_PP(zvpp), &key, &hpos);
- if (Z_TYPE(key) == IS_LONG) {
- zend_hash_index_del(Z_ARRVAL_PP(zvpp), Z_LVAL(key));
- }
-*/
zend_hash_del(Z_ARRVAL_P(zvp), strkey);
}
}
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(zvp), name) {
if (Z_TYPE_P(name) == IS_STRING) {
- phpdbg_notice("wait", "missingextension=\"%.*s\"", "The Zend extension %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/extension.so", Z_STRLEN_P(name), Z_STRVAL_P(name));
+ phpdbg_notice("wait", "missingextension=\"%.*s\"", "The Zend extension %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/extension.so", (int) Z_STRLEN_P(name), Z_STRVAL_P(name));
}
} ZEND_HASH_FOREACH_END();
}