- Fix valgrind reports + CS

This commit is contained in:
Felipe Pena 2013-11-18 19:55:29 -02:00
parent a1156cae5c
commit 8951406678
3 changed files with 9 additions and 7 deletions

View file

@ -41,6 +41,7 @@ static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
pg->lcmd = NULL;
pg->flags = PHPDBG_DEFAULT_FLAGS;
pg->oplog = NULL;
memset(&pg->lparam, 0, sizeof(phpdbg_param_t));
} /* }}} */
static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */

View file

@ -153,7 +153,7 @@ void phpdbg_list_file(const char *filename, long count, long offset, int highlig
return;
}
last_pos = mem = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
pos = last_pos = mem = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
end_pos = mem + st.st_size;
#else
@ -170,7 +170,7 @@ void phpdbg_list_file(const char *filename, long count, long offset, int highlig
return;
}
last_pos = mem = (char*) MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
pos = last_pos = mem = (char*) MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
if (mem == NULL) {
phpdbg_error("Failed to map file in memory");
CloseHandle(map);

View file

@ -37,7 +37,8 @@ PHPDBG_PRINT(opline) /* {{{ */
return SUCCESS;
} /* }}} */
static inline void phpdbg_print_function_helper(zend_function *method TSRMLS_DC) {
static inline void phpdbg_print_function_helper(zend_function *method TSRMLS_DC) /* {{{ */
{
switch (method->type) {
case ZEND_USER_FUNCTION: {
zend_op_array* op_array = &method->op_array;
@ -85,7 +86,7 @@ static inline void phpdbg_print_function_helper(zend_function *method TSRMLS_DC)
}
}
}
}
} /* }}} */
PHPDBG_PRINT(exec) /* {{{ */
{