summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqlnd/mysqlnd_debug.c')
-rw-r--r--ext/mysqlnd/mysqlnd_debug.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c
index 37a1a594a4..55590f45c9 100644
--- a/ext/mysqlnd/mysqlnd_debug.c
+++ b/ext/mysqlnd/mysqlnd_debug.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -78,7 +76,7 @@ MYSQLND_METHOD(mysqlnd_debug, log)(MYSQLND_DEBUG * self,
}
if (flags & MYSQLND_DEBUG_DUMP_TIME) {
/* The following from FF's DBUG library, which is in the public domain */
-#if defined(PHP_WIN32)
+#ifdef PHP_WIN32
/* FIXME This doesn't give microseconds as in Unix case, and the resolution is
in system ticks, 10 ms intervals. See my_getsystime.c for high res */
SYSTEMTIME loc_t;
@@ -175,7 +173,7 @@ MYSQLND_METHOD(mysqlnd_debug, log_va)(MYSQLND_DEBUG *self,
}
if (flags & MYSQLND_DEBUG_DUMP_TIME) {
/* The following from FF's DBUG library, which is in the public domain */
-#if defined(PHP_WIN32)
+#ifdef PHP_WIN32
/* FIXME This doesn't give microseconds as in Unix case, and the resolution is
in system ticks, 10 ms intervals. See my_getsystime.c for high res */
SYSTEMTIME loc_t;
@@ -414,7 +412,8 @@ MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int lin
#endif
}
- return zend_stack_del_top(&self->call_stack) == SUCCESS? PASS:FAIL;
+ zend_stack_del_top(&self->call_stack);
+ return PASS;
}
/* }}} */
@@ -545,11 +544,9 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
state = PARSER_WAIT_COLON;
break;
case ':':
-#if 0
if (state != PARSER_WAIT_COLON) {
php_error_docref(NULL, E_WARNING, "Consecutive semicolons at position %u", i);
}
-#endif
state = PARSER_WAIT_MODIFIER;
break;
case 'f': /* limit output to these functions */
@@ -583,10 +580,8 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
}
i = j;
} else {
-#if 0
php_error_docref(NULL, E_WARNING,
"Expected list of functions for '%c' found none", mode[i]);
-#endif
}
state = PARSER_WAIT_COLON;
break;
@@ -663,9 +658,7 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
break;
default:
if (state == PARSER_WAIT_MODIFIER) {
-#if 0
php_error_docref(NULL, E_WARNING, "Unrecognized format '%c'", mode[i]);
-#endif
if (i+1 < mode_len && mode[i+1] == ',') {
i+= 2;
while (i < mode_len) {
@@ -677,9 +670,7 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
}
state = PARSER_WAIT_COLON;
} else if (state == PARSER_WAIT_COLON) {
-#if 0
php_error_docref(NULL, E_WARNING, "Colon expected, '%c' found", mode[i]);
-#endif
}
break;
}