diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 5618849d4d6..3f298fc6d93 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -229,11 +229,11 @@ TSRM_API void tsrm_shutdown(void) /* {{{ */ /* environ lock api */ TSRM_API void tsrm_env_lock(void) { - tsrm_mutex_lock(tsrm_env_mutex); + tsrm_mutex_lock(tsrm_env_mutex); } TSRM_API void tsrm_env_unlock(void) { - tsrm_mutex_unlock(tsrm_env_mutex); + tsrm_mutex_unlock(tsrm_env_mutex); } /* }}} */ /* enlarge the arrays for the already active threads */ @@ -768,7 +768,7 @@ TSRM_API uint8_t tsrm_is_main_thread(void) TSRM_API uint8_t tsrm_is_shutdown(void) {/*{{{*/ - return is_thread_shutdown; + return is_thread_shutdown; }/*}}}*/ TSRM_API const char *tsrm_api_name(void) diff --git a/Zend/Optimizer/escape_analysis.c b/Zend/Optimizer/escape_analysis.c index 73ab2e14c88..e92b927b722 100644 --- a/Zend/Optimizer/escape_analysis.c +++ b/Zend/Optimizer/escape_analysis.c @@ -188,7 +188,7 @@ static int is_allocation_def(zend_op_array *op_array, zend_ssa *ssa, int def, in } break; } - } else if (ssa_op->op1_def == var) { + } else if (ssa_op->op1_def == var) { switch (opline->opcode) { case ZEND_ASSIGN: if (opline->op2_type == IS_CONST @@ -208,7 +208,7 @@ static int is_allocation_def(zend_op_array *op_array, zend_ssa *ssa, int def, in } } - return 0; + return 0; } /* }}} */ diff --git a/Zend/Optimizer/optimize_temp_vars_5.c b/Zend/Optimizer/optimize_temp_vars_5.c index aaac0b882c8..118f9243ded 100644 --- a/Zend/Optimizer/optimize_temp_vars_5.c +++ b/Zend/Optimizer/optimize_temp_vars_5.c @@ -59,12 +59,12 @@ void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_c valid_T = (zend_bitset) zend_arena_alloc(&ctx->arena, bitset_len * ZEND_BITSET_ELM_SIZE); map_T = (int *) zend_arena_alloc(&ctx->arena, T * sizeof(int)); - end = op_array->opcodes; - opline = &op_array->opcodes[op_array->last - 1]; + end = op_array->opcodes; + opline = &op_array->opcodes[op_array->last - 1]; - /* Find T definition points */ - while (opline >= end) { - if (opline->result_type & (IS_VAR | IS_TMP_VAR)) { + /* Find T definition points */ + while (opline >= end) { + if (opline->result_type & (IS_VAR | IS_TMP_VAR)) { start_of_T[VAR_NUM(opline->result.var) - offset] = opline; } opline--; @@ -73,10 +73,10 @@ void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_c zend_bitset_clear(valid_T, bitset_len); zend_bitset_clear(taken_T, bitset_len); - end = op_array->opcodes; - opline = &op_array->opcodes[op_array->last - 1]; + end = op_array->opcodes; + opline = &op_array->opcodes[op_array->last - 1]; - while (opline >= end) { + while (opline >= end) { if ((opline->op1_type & (IS_VAR | IS_TMP_VAR))) { currT = VAR_NUM(opline->op1.var) - offset; if (opline->opcode == ZEND_ROPE_END) { diff --git a/Zend/Optimizer/zend_call_graph.c b/Zend/Optimizer/zend_call_graph.c index 1f290c5e004..657215cc5b3 100644 --- a/Zend/Optimizer/zend_call_graph.c +++ b/Zend/Optimizer/zend_call_graph.c @@ -35,7 +35,7 @@ static void zend_op_array_calc(zend_op_array *op_array, void *context) static void zend_op_array_collect(zend_op_array *op_array, void *context) { zend_call_graph *call_graph = context; - zend_func_info *func_info = call_graph->func_infos + call_graph->op_arrays_count; + zend_func_info *func_info = call_graph->func_infos + call_graph->op_arrays_count; ZEND_SET_FUNC_INFO(op_array, func_info); call_graph->op_arrays[call_graph->op_arrays_count] = op_array; diff --git a/Zend/Optimizer/zend_inference.c b/Zend/Optimizer/zend_inference.c index 145040eae7d..b4efbeabb05 100644 --- a/Zend/Optimizer/zend_inference.c +++ b/Zend/Optimizer/zend_inference.c @@ -3285,7 +3285,7 @@ static zend_always_inline int _zend_update_type_info( if (opline->opcode == ZEND_FETCH_DIM_W || opline->opcode == ZEND_FETCH_DIM_RW || opline->opcode == ZEND_FETCH_DIM_FUNC_ARG || - opline->opcode == ZEND_FETCH_LIST_W) { + opline->opcode == ZEND_FETCH_LIST_W) { if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) { if (opline->opcode != ZEND_FETCH_DIM_FUNC_ARG) { tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE); diff --git a/Zend/Optimizer/zend_optimizer.c b/Zend/Optimizer/zend_optimizer.c index e4cc8782fea..66a27bd9c74 100644 --- a/Zend/Optimizer/zend_optimizer.c +++ b/Zend/Optimizer/zend_optimizer.c @@ -645,7 +645,7 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array, ZEND_ASSERT(opline->op1.var == var); break; - } + } default: break; } diff --git a/Zend/zend.c b/Zend/zend.c index 63f90c4d4c2..5c1208aa11b 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -196,9 +196,9 @@ ZEND_INI_BEGIN() ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting) STD_ZEND_INI_ENTRY("zend.assertions", "1", ZEND_INI_ALL, OnUpdateAssertions, assertions, zend_executor_globals, executor_globals) ZEND_INI_ENTRY3_EX("zend.enable_gc", "1", ZEND_INI_ALL, OnUpdateGCEnabled, NULL, NULL, NULL, zend_gc_enabled_displayer_cb) - STD_ZEND_INI_BOOLEAN("zend.multibyte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte, zend_compiler_globals, compiler_globals) - ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding) - STD_ZEND_INI_BOOLEAN("zend.detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals) + STD_ZEND_INI_BOOLEAN("zend.multibyte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte, zend_compiler_globals, compiler_globals) + ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding) + STD_ZEND_INI_BOOLEAN("zend.detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals) #ifdef ZEND_SIGNALS STD_ZEND_INI_BOOLEAN("zend.signal_check", SIGNAL_CHECK_DEFAULT, ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals) #endif diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ca4ca0caffb..032368daf8d 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -377,7 +377,7 @@ static ZEND_COLD void ZEND_FASTCALL zend_argument_error_variadic(zend_class_entr zend_throw_error(error_ce, "%s(): Argument #%d%s%s%s %s", ZSTR_VAL(func_name), arg_num, arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "", message - ); + ); efree(message); zend_string_release(func_name); } @@ -1548,12 +1548,12 @@ ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properti ZEND_API void object_properties_load(zend_object *object, HashTable *properties) /* {{{ */ { - zval *prop, tmp; - zend_string *key; - zend_long h; - zend_property_info *property_info; + zval *prop, tmp; + zend_string *key; + zend_long h; + zend_property_info *property_info; - ZEND_HASH_FOREACH_KEY_VAL(properties, h, key, prop) { + ZEND_HASH_FOREACH_KEY_VAL(properties, h, key, prop) { if (key) { if (ZSTR_VAL(key)[0] == '\0') { const char *class_name, *prop_name; diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 75deafa6baa..38608d0f15a 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -323,17 +323,17 @@ struct _zend_mm_huge_list { #define _BIN_DATA_SIZE(num, size, elements, pages, x, y) size, static const uint32_t bin_data_size[] = { - ZEND_MM_BINS_INFO(_BIN_DATA_SIZE, x, y) + ZEND_MM_BINS_INFO(_BIN_DATA_SIZE, x, y) }; #define _BIN_DATA_ELEMENTS(num, size, elements, pages, x, y) elements, static const uint32_t bin_elements[] = { - ZEND_MM_BINS_INFO(_BIN_DATA_ELEMENTS, x, y) + ZEND_MM_BINS_INFO(_BIN_DATA_ELEMENTS, x, y) }; #define _BIN_DATA_PAGES(num, size, elements, pages, x, y) pages, static const uint32_t bin_pages[] = { - ZEND_MM_BINS_INFO(_BIN_DATA_PAGES, x, y) + ZEND_MM_BINS_INFO(_BIN_DATA_PAGES, x, y) }; #if ZEND_DEBUG @@ -1186,8 +1186,8 @@ static zend_always_inline int zend_mm_small_size_to_bin(size_t size) static zend_never_inline void *zend_mm_alloc_small_slow(zend_mm_heap *heap, uint32_t bin_num ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { - zend_mm_chunk *chunk; - int page_num; + zend_mm_chunk *chunk; + int page_num; zend_mm_bin *bin; zend_mm_free_slot *p, *end; @@ -1275,9 +1275,9 @@ static zend_always_inline void zend_mm_free_small(zend_mm_heap *heap, void *ptr, } while (0); #endif - p = (zend_mm_free_slot*)ptr; - p->next_free_slot = heap->free_slot[bin_num]; - heap->free_slot[bin_num] = p; + p = (zend_mm_free_slot*)ptr; + p->next_free_slot = heap->free_slot[bin_num]; + heap->free_slot[bin_num] = p; } /********/ @@ -2015,7 +2015,7 @@ ZEND_API size_t zend_mm_gc(zend_mm_heap *heap) static zend_long zend_mm_find_leaks_small(zend_mm_chunk *p, uint32_t i, uint32_t j, zend_leak_info *leak) { - int empty = 1; + int empty = 1; zend_long count = 0; int bin_num = ZEND_MM_SRUN_BIN_NUM(p->map[i]); zend_mm_debug_info *dbg = (zend_mm_debug_info*)((char*)p + ZEND_MM_PAGE_SIZE * i + bin_data_size[bin_num] * (j + 1) - ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info))); @@ -2426,7 +2426,7 @@ static ZEND_COLD void ZEND_FASTCALL _efree_custom(void *ptr ZEND_FILE_LINE_DC ZE AG(mm_heap)->custom_heap.debug._free(ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); } else { AG(mm_heap)->custom_heap.std._free(ptr); - } + } } static ZEND_COLD void* ZEND_FASTCALL _realloc_custom(void *ptr, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) @@ -2924,9 +2924,9 @@ ZEND_API void zend_mm_get_custom_handlers(zend_mm_heap *heap, #if ZEND_DEBUG ZEND_API void zend_mm_set_custom_debug_handlers(zend_mm_heap *heap, - void* (*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), - void (*_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), - void* (*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)) + void* (*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), + void (*_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC), + void* (*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)) { #if ZEND_MM_CUSTOM zend_mm_heap *_heap = (zend_mm_heap*)heap; diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index e222e4bd740..927fc23d950 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -474,7 +474,7 @@ static zend_result zend_ast_add_array_element(zval *result, zval *offset, zval * default: zend_type_error("Illegal offset type"); return FAILURE; - } + } return SUCCESS; } diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 40fae345daa..c9f77b1c0ea 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -492,7 +492,7 @@ ZEND_FUNCTION(define) if (non_cs) { zend_error(E_WARNING, "define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported"); - } + } ZVAL_UNDEF(&val_free); @@ -1018,7 +1018,7 @@ static inline void class_exists_impl(INTERNAL_FUNCTION_PARAMETERS, int flags, in ce = zend_lookup_class(name); } - if (ce) { + if (ce) { RETURN_BOOL(((ce->ce_flags & flags) == flags) && !(ce->ce_flags & skip_flags)); } else { RETURN_FALSE; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index dade906f4b8..a5ef8a952ac 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -757,7 +757,7 @@ void zend_do_free(znode *op1) /* {{{ */ } else { while (opline >= CG(active_op_array)->opcodes) { if ((opline->opcode == ZEND_FETCH_LIST_R || - opline->opcode == ZEND_FETCH_LIST_W) && + opline->opcode == ZEND_FETCH_LIST_W) && opline->op1_type == IS_VAR && opline->op1.var == op1->u.op.var) { zend_emit_op(NULL, ZEND_FREE, op1, NULL); @@ -3819,7 +3819,7 @@ static zend_result zend_compile_func_is_scalar(znode *result, zend_ast_list *arg zend_compile_expr(&arg_node, args->child[0]); opline = zend_emit_op_tmp(result, ZEND_TYPE_CHECK, &arg_node, NULL); - opline->extended_value = (1 << IS_FALSE | 1 << IS_TRUE | 1 << IS_DOUBLE | 1 << IS_LONG | 1 << IS_STRING); + opline->extended_value = (1 << IS_FALSE | 1 << IS_TRUE | 1 << IS_DOUBLE | 1 << IS_LONG | 1 << IS_STRING); return SUCCESS; } diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index cef9becc7ee..bc9f9ef1d92 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -89,7 +89,7 @@ ZEND_API zend_class_entry *zend_get_exception_base(zend_object *object) /* {{{ * void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) /* {{{ */ { - zval *previous, *ancestor, *ex; + zval *previous, *ancestor, *ex; zval pv, zv, rv; zend_class_entry *base_ce; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 6076dc66c71..bb0a2d8d33d 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2789,7 +2789,7 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c zend_object *zobj; zend_string *name, *tmp_name; - if (container_op_type != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) { + if (container_op_type != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) { do { if (Z_ISREF_P(container) && Z_TYPE_P(Z_REFVAL_P(container)) == IS_OBJECT) { container = Z_REFVAL_P(container); @@ -3726,7 +3726,7 @@ ZEND_API void zend_init_func_execute_data(zend_execute_data *ex, zend_op_array * i_init_func_execute_data(op_array, return_value, 1 EXECUTE_DATA_CC); #if defined(ZEND_VM_IP_GLOBAL_REG) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)) - EX(opline) = opline; + EX(opline) = opline; opline = orig_opline; #endif #if defined(ZEND_VM_FP_GLOBAL_REG) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index bcd6863dfe7..a551c539395 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1274,7 +1274,7 @@ ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void) /* {{{ */ static void zend_timeout_handler(int dummy) /* {{{ */ { #ifndef ZTS - if (EG(timed_out)) { + if (EG(timed_out)) { /* Die on hard timeout */ const char *error_filename = NULL; uint32_t error_lineno = 0; @@ -1302,7 +1302,7 @@ static void zend_timeout_handler(int dummy) /* {{{ */ zend_quiet_write(2, log_buffer, MIN(output_len, sizeof(log_buffer))); } _exit(124); - } + } #endif if (zend_on_timeout) { @@ -1538,7 +1538,7 @@ zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, zend_string ZEND_API zend_result zend_delete_global_variable(zend_string *name) /* {{{ */ { - return zend_hash_del_ind(&EG(symbol_table), name); + return zend_hash_del_ind(&EG(symbol_table), name); } /* }}} */ diff --git a/Zend/zend_fibers.c b/Zend/zend_fibers.c index 6b8c8dede6b..dbfc3d6363d 100644 --- a/Zend/zend_fibers.c +++ b/Zend/zend_fibers.c @@ -615,7 +615,7 @@ ZEND_METHOD(Fiber, start) RETURN_THROWS(); } - if (fiber->context.status != ZEND_FIBER_STATUS_INIT) { + if (fiber->context.status != ZEND_FIBER_STATUS_INIT) { zend_throw_error(zend_ce_fiber_error, "Cannot start a fiber that has already been started"); RETURN_THROWS(); } @@ -657,7 +657,7 @@ ZEND_METHOD(Fiber, suspend) RETURN_THROWS(); } - ZEND_ASSERT(fiber->context.status == ZEND_FIBER_STATUS_RUNNING || fiber->context.status == ZEND_FIBER_STATUS_SUSPENDED); + ZEND_ASSERT(fiber->context.status == ZEND_FIBER_STATUS_RUNNING || fiber->context.status == ZEND_FIBER_STATUS_SUSPENDED); fiber->execute_data = EG(current_execute_data); fiber->stack_bottom->prev_execute_data = NULL; diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index b62c649d2ee..87180a03a7b 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -426,17 +426,17 @@ ZEND_API void ZEND_FASTCALL zend_hash_discard(HashTable *ht, uint32_t nNumUsed) static uint32_t zend_array_recalc_elements(HashTable *ht) { - zval *val; - uint32_t num = ht->nNumOfElements; + zval *val; + uint32_t num = ht->nNumOfElements; - ZEND_HASH_FOREACH_VAL(ht, val) { - if (Z_TYPE_P(val) == IS_INDIRECT) { - if (UNEXPECTED(Z_TYPE_P(Z_INDIRECT_P(val)) == IS_UNDEF)) { - num--; - } - } - } ZEND_HASH_FOREACH_END(); - return num; + ZEND_HASH_FOREACH_VAL(ht, val) { + if (Z_TYPE_P(val) == IS_INDIRECT) { + if (UNEXPECTED(Z_TYPE_P(Z_INDIRECT_P(val)) == IS_UNDEF)) { + num--; + } + } + } ZEND_HASH_FOREACH_END(); + return num; } /* }}} */ @@ -1872,7 +1872,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_fu ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *argument) { - uint32_t idx; + uint32_t idx; Bucket *p; int result; @@ -1955,7 +1955,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_reverse_apply(HashTable *ht, apply_func_t ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor) { - uint32_t idx; + uint32_t idx; Bucket *p; zval *new_entry, *data; @@ -2170,7 +2170,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source) ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, bool overwrite) { - uint32_t idx; + uint32_t idx; Bucket *p; zval *t, *s; @@ -2393,9 +2393,9 @@ ZEND_API zend_result ZEND_FASTCALL zend_hash_move_backwards_ex(HashTable *ht, Ha } } *pos = ht->nNumUsed; - return SUCCESS; + return SUCCESS; } else { - return FAILURE; + return FAILURE; } } diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 5eb4066ac29..59c81843818 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -238,7 +238,7 @@ ZEND_API zend_result zend_register_ini_entries(const zend_ini_entry_def *ini_ent return FAILURE; } if (((default_value = zend_get_configuration_directive(p->name)) != NULL) && - (!p->on_modify || p->on_modify(p, Z_STR_P(default_value), p->mh_arg1, p->mh_arg2, p->mh_arg3, ZEND_INI_STAGE_STARTUP) == SUCCESS)) { + (!p->on_modify || p->on_modify(p, Z_STR_P(default_value), p->mh_arg1, p->mh_arg2, p->mh_arg3, ZEND_INI_STAGE_STARTUP) == SUCCESS)) { p->value = zend_new_interned_string(zend_string_copy(Z_STR_P(default_value))); } else { @@ -284,8 +284,8 @@ ZEND_API zend_result zend_alter_ini_entry(zend_string *name, zend_string *new_va ZEND_API zend_result zend_alter_ini_entry_chars(zend_string *name, const char *value, size_t value_length, int modify_type, int stage) /* {{{ */ { - zend_result ret; - zend_string *new_value; + zend_result ret; + zend_string *new_value; new_value = zend_string_init(value, value_length, !(stage & ZEND_INI_STAGE_IN_REQUEST)); ret = zend_alter_ini_entry_ex(name, new_value, modify_type, stage, 0); @@ -296,8 +296,8 @@ ZEND_API zend_result zend_alter_ini_entry_chars(zend_string *name, const char *v ZEND_API zend_result zend_alter_ini_entry_chars_ex(zend_string *name, const char *value, size_t value_length, int modify_type, int stage, int force_change) /* {{{ */ { - zend_result ret; - zend_string *new_value; + zend_result ret; + zend_string *new_value; new_value = zend_string_init(value, value_length, !(stage & ZEND_INI_STAGE_IN_REQUEST)); ret = zend_alter_ini_entry_ex(name, new_value, modify_type, stage, force_change); diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 8fb31f7dbff..423ecf14603 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -3156,8 +3156,9 @@ ZEND_API zend_string* ZEND_FASTCALL zend_i64_to_str(int64_t num) } } -ZEND_API zend_uchar ZEND_FASTCALL is_numeric_str_function(const zend_string *str, zend_long *lval, double *dval) /* {{{ */ { - return is_numeric_string(ZSTR_VAL(str), ZSTR_LEN(str), lval, dval, false); +ZEND_API zend_uchar ZEND_FASTCALL is_numeric_str_function(const zend_string *str, zend_long *lval, double *dval) /* {{{ */ +{ + return is_numeric_string(ZSTR_VAL(str), ZSTR_LEN(str), lval, dval, false); } /* }}} */ diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c index 66f10d8dcd2..4c573638366 100644 --- a/ext/bz2/bz2_filter.c +++ b/ext/bz2/bz2_filter.c @@ -24,9 +24,9 @@ /* {{{ data structure */ enum strm_status { - PHP_BZ2_UNINITIALIZED, - PHP_BZ2_RUNNING, - PHP_BZ2_FINISHED + PHP_BZ2_UNINITIALIZED, + PHP_BZ2_RUNNING, + PHP_BZ2_FINISHED }; typedef struct _php_bz2_filter_data { diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index 63193aae1db..e26febc26f2 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -112,7 +112,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, zend_long gm) } else { /* return the days after March 21 */ result = easter; } - ZVAL_LONG(return_value, result); + ZVAL_LONG(return_value, result); } /* {{{ Return the timestamp of midnight on Easter of a given year (defaults to current year) */ diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index c14ec897cb5..6ed79e4da52 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -135,10 +135,10 @@ static ZEND_INI_MH(OnAutoregisterCasesensitive) } PHP_INI_BEGIN() - STD_PHP_INI_BOOLEAN("com.allow_dcom", "0", PHP_INI_SYSTEM, OnUpdateBool, allow_dcom, zend_com_dotnet_globals, com_dotnet_globals) - STD_PHP_INI_BOOLEAN("com.autoregister_verbose", "0", PHP_INI_ALL, OnUpdateBool, autoreg_verbose, zend_com_dotnet_globals, com_dotnet_globals) - STD_PHP_INI_BOOLEAN("com.autoregister_typelib", "0", PHP_INI_ALL, OnUpdateBool, autoreg_on, zend_com_dotnet_globals, com_dotnet_globals) - STD_PHP_INI_ENTRY("com.autoregister_casesensitive", "1", PHP_INI_ALL, OnAutoregisterCasesensitive, autoreg_case_sensitive, zend_com_dotnet_globals, com_dotnet_globals) + STD_PHP_INI_BOOLEAN("com.allow_dcom", "0", PHP_INI_SYSTEM, OnUpdateBool, allow_dcom, zend_com_dotnet_globals, com_dotnet_globals) + STD_PHP_INI_BOOLEAN("com.autoregister_verbose", "0", PHP_INI_ALL, OnUpdateBool, autoreg_verbose, zend_com_dotnet_globals, com_dotnet_globals) + STD_PHP_INI_BOOLEAN("com.autoregister_typelib", "0", PHP_INI_ALL, OnUpdateBool, autoreg_on, zend_com_dotnet_globals, com_dotnet_globals) + STD_PHP_INI_ENTRY("com.autoregister_casesensitive", "1", PHP_INI_ALL, OnAutoregisterCasesensitive, autoreg_case_sensitive, zend_com_dotnet_globals, com_dotnet_globals) STD_PHP_INI_ENTRY("com.code_page", "", PHP_INI_ALL, OnUpdateLong, code_page, zend_com_dotnet_globals, com_dotnet_globals) PHP_INI_ENTRY("com.typelib_file", "", PHP_INI_SYSTEM, OnTypeLibFileUpdate) PHP_INI_ENTRY("com.dotnet_version", NULL, PHP_INI_SYSTEM, NULL) diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 484bd810302..193eca3d77b 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -384,14 +384,14 @@ PHP_COM_DOTNET_API int php_com_copy_variant(VARIANT *dstvar, VARIANT *srcvar) } else { V_BOOL(dstvar) = V_BOOL(srcvar); } - break; + break; case VT_BSTR: if (V_VT(dstvar) & VT_BYREF) { *V_BSTRREF(dstvar) = V_BSTR(srcvar); } else { V_BSTR(dstvar) = V_BSTR(srcvar); - } + } break; case VT_UNKNOWN: diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index 86e7fa6ee80..3227df2e349 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -43,7 +43,7 @@ zend_module_entry ctype_module_entry = { NULL, NULL, PHP_MINFO(ctype), - PHP_CTYPE_VERSION, + PHP_CTYPE_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/curl/curl_file.c b/ext/curl/curl_file.c index 4833e3cfe5c..3210349ed61 100644 --- a/ext/curl/curl_file.c +++ b/ext/curl/curl_file.c @@ -61,8 +61,8 @@ ZEND_METHOD(CURLFile, __construct) /* {{{ Create the CURLFile object */ PHP_FUNCTION(curl_file_create) { - object_init_ex( return_value, curl_CURLFile_class ); - curlfile_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU); + object_init_ex( return_value, curl_CURLFile_class ); + curlfile_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU); } /* }}} */ diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 9db2286e9bd..d0eddb4feec 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -394,7 +394,7 @@ static int _php_server_push_callback(CURL *parent_ch, CURL *easy, size_t num_hea for(i=0; ifunc_name, 0, &fci, &t->fci_cache, NULL, NULL); diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ed248f55762..116a2135258 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -58,16 +58,16 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; PHPAPI time_t php_time(void) { #ifdef HAVE_GETTIMEOFDAY - struct timeval tm; + struct timeval tm; - if (UNEXPECTED(gettimeofday(&tm, NULL) != SUCCESS)) { - /* fallback, can't reasonably happen */ - return time(NULL); - } + if (UNEXPECTED(gettimeofday(&tm, NULL) != SUCCESS)) { + /* fallback, can't reasonably happen */ + return time(NULL); + } - return tm.tv_sec; + return tm.tv_sec; #else - return time(NULL); + return time(NULL); #endif } @@ -1775,9 +1775,9 @@ static HashTable *date_object_get_gc(zend_object *object, zval **table, int *n) static HashTable *date_object_get_gc_timezone(zend_object *object, zval **table, int *n) /* {{{ */ { - *table = NULL; - *n = 0; - return zend_std_get_properties(object); + *table = NULL; + *n = 0; + return zend_std_get_properties(object); } /* }}} */ static HashTable *date_object_get_properties_for(zend_object *object, zend_prop_purpose purpose) /* {{{ */ @@ -2090,11 +2090,11 @@ static zend_object *date_object_clone_period(zend_object *this_ptr) /* {{{ */ new_obj->current = timelib_time_clone(old_obj->current); } if (old_obj->end) { - new_obj->end = timelib_time_clone(old_obj->end); - } - if (old_obj->interval) { - new_obj->interval = timelib_rel_time_clone(old_obj->interval); - } + new_obj->end = timelib_time_clone(old_obj->end); + } + if (old_obj->interval) { + new_obj->interval = timelib_rel_time_clone(old_obj->interval); + } return &new_obj->std; } /* }}} */ @@ -4269,27 +4269,27 @@ PHP_METHOD(DatePeriod, getStartDate) /* {{{ Get end date. */ PHP_METHOD(DatePeriod, getEndDate) { - php_period_obj *dpobj; - php_date_obj *dateobj; + php_period_obj *dpobj; + php_date_obj *dateobj; - ZEND_PARSE_PARAMETERS_NONE(); + ZEND_PARSE_PARAMETERS_NONE(); - dpobj = Z_PHPPERIOD_P(ZEND_THIS); + dpobj = Z_PHPPERIOD_P(ZEND_THIS); - if (!dpobj->end) { - return; - } + if (!dpobj->end) { + return; + } - php_date_instantiate(dpobj->start_ce, return_value); - dateobj = Z_PHPDATE_P(return_value); - dateobj->time = timelib_time_ctor(); - *dateobj->time = *dpobj->end; - if (dpobj->end->tz_abbr) { - dateobj->time->tz_abbr = timelib_strdup(dpobj->end->tz_abbr); - } - if (dpobj->end->tz_info) { - dateobj->time->tz_info = dpobj->end->tz_info; - } + php_date_instantiate(dpobj->start_ce, return_value); + dateobj = Z_PHPDATE_P(return_value); + dateobj->time = timelib_time_ctor(); + *dateobj->time = *dpobj->end; + if (dpobj->end->tz_abbr) { + dateobj->time->tz_abbr = timelib_strdup(dpobj->end->tz_abbr); + } + if (dpobj->end->tz_info) { + dateobj->time->tz_info = dpobj->end->tz_info; + } } /* }}} */ diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 4947eedba13..57bfb5e4f85 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -236,7 +236,7 @@ static dba_handler handler[] = { DBA_HND(cdb, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */ #endif #if DBA_CDB_BUILTIN - DBA_NAMED_HND(cdb_make, cdb, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */ + DBA_NAMED_HND(cdb_make, cdb, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */ #endif #if DBA_DB1 DBA_HND(db1, DBA_LOCK_ALL) /* No lock in lib */ @@ -404,7 +404,7 @@ ZEND_INI_MH(OnUpdateDefaultHandler) } PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("dba.default_handler", DBA_DEFAULT, PHP_INI_ALL, OnUpdateDefaultHandler, default_handler, zend_dba_globals, dba_globals) + STD_PHP_INI_ENTRY("dba.default_handler", DBA_DEFAULT, PHP_INI_ALL, OnUpdateDefaultHandler, default_handler, zend_dba_globals, dba_globals) PHP_INI_END() /* }}} */ @@ -448,10 +448,10 @@ PHP_MINFO_FUNCTION(dba) for(hptr = handler; hptr->name; hptr++) { smart_str_appends(&handlers, hptr->name); smart_str_appendc(&handlers, ' '); - } + } php_info_print_table_start(); - php_info_print_table_row(2, "DBA support", "enabled"); + php_info_print_table_row(2, "DBA support", "enabled"); if (handlers.s) { smart_str_0(&handlers); php_info_print_table_row(2, "Supported handlers", ZSTR_VAL(handlers.s)); @@ -1172,7 +1172,7 @@ PHP_FUNCTION(dba_handlers) } else { add_next_index_string(return_value, hptr->name); } - } + } } /* }}} */ diff --git a/ext/dom/document.c b/ext/dom/document.c index b3a12663a5b..85879790a75 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -154,16 +154,16 @@ zend_result dom_document_encoding_write(dom_object *obj, zval *newval) handler = xmlFindCharEncodingHandler(ZSTR_VAL(str)); - if (handler != NULL) { + if (handler != NULL) { xmlCharEncCloseFunc(handler); if (docp->encoding != NULL) { xmlFree((xmlChar *)docp->encoding); } docp->encoding = xmlStrdup((const xmlChar *) ZSTR_VAL(str)); - } else { + } else { zend_value_error("Invalid document encoding"); return FAILURE; - } + } zend_string_release_ex(str, 0); return SUCCESS; @@ -1166,8 +1166,8 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t source_len, size_t options) /* {{{ */ { - xmlDocPtr ret; - xmlParserCtxtPtr ctxt = NULL; + xmlDocPtr ret; + xmlParserCtxtPtr ctxt = NULL; dom_doc_propsptr doc_props; dom_object *intern; php_libxml_ref_obj *document = NULL; diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index a939f192da2..4e7f76a7de8 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -61,10 +61,10 @@ PHP_METHOD(DOMDocumentFragment, __construct) needed for hack in appendXML due to libxml bug - no need to share this function */ static void php_dom_xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) /* {{{ */ { - xmlAttrPtr prop; + xmlAttrPtr prop; xmlNodePtr cur; - if (tree) { + if (tree) { if(tree->type == XML_ELEMENT_NODE) { prop = tree->properties; while (prop != NULL) { @@ -87,7 +87,7 @@ static void php_dom_xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) /* {{{ */ } } tree->doc = doc; - } + } } /* }}} */ diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index 0758ed10618..72c97104db0 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -61,9 +61,9 @@ xmlNodePtr create_notation(const xmlChar *name, const xmlChar *ExternalID, const xmlEntityPtr ret; ret = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity)); - memset(ret, 0, sizeof(xmlEntity)); - ret->type = XML_NOTATION_NODE; - ret->name = xmlStrdup(name); + memset(ret, 0, sizeof(xmlEntity)); + ret->type = XML_NOTATION_NODE; + ret->name = xmlStrdup(name); ret->ExternalID = xmlStrdup(ExternalID); ret->SystemID = xmlStrdup(SystemID); ret->length = 0; diff --git a/ext/dom/element.c b/ext/dom/element.c index 4dfa3b43769..9ff001475f2 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -152,8 +152,8 @@ int dom_element_schema_type_info_read(dom_object *obj, zval *retval) static xmlNodePtr dom_get_dom1_attribute(xmlNodePtr elem, xmlChar *name) /* {{{ */ { - int len; - const xmlChar *nqname; + int len; + const xmlChar *nqname; nqname = xmlSplitQName3(name, &len); if (nqname != NULL) { @@ -570,9 +570,9 @@ PHP_METHOD(DOMElement, getAttributeNS) static xmlNsPtr _dom_new_reconNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) /* {{{ */ { - xmlNsPtr def; - xmlChar prefix[50]; - int counter = 1; + xmlNsPtr def; + xmlChar prefix[50]; + int counter = 1; if ((tree == NULL) || (ns == NULL) || (ns->type != XML_NAMESPACE_DECL)) { return NULL; @@ -883,12 +883,12 @@ PHP_METHOD(DOMElement, setAttributeNodeNS) RETURN_FALSE; } - nsp = attrp->ns; - if (nsp != NULL) { - existattrp = xmlHasNsProp(nodep, nsp->href, attrp->name); - } else { - existattrp = xmlHasProp(nodep, attrp->name); - } + nsp = attrp->ns; + if (nsp != NULL) { + existattrp = xmlHasNsProp(nodep, nsp->href, attrp->name); + } else { + existattrp = xmlHasProp(nodep, attrp->name); + } if (existattrp != NULL && existattrp->type != XML_ATTRIBUTE_DECL) { if ((oldobj = php_dom_object_get_data((xmlNodePtr) existattrp)) != NULL && diff --git a/ext/dom/node.c b/ext/dom/node.c index 67c6b768be0..5815b96c77d 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1665,7 +1665,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ buf = xmlAllocOutputBuffer(NULL); } - if (buf != NULL) { + if (buf != NULL) { ret = xmlC14NDocSaveTo(docp, nodeset, exclusive, inclusive_ns_prefixes, with_comments, buf); } @@ -1680,9 +1680,9 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ xmlXPathFreeContext(ctxp); } - if (buf == NULL || ret < 0) { - RETVAL_FALSE; - } else { + if (buf == NULL || ret < 0) { + RETVAL_FALSE; + } else { if (mode == 0) { #ifdef LIBXML2_NEW_BUFFER ret = xmlOutputBufferGetSize(buf); @@ -1699,7 +1699,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ RETVAL_EMPTY_STRING(); } } - } + } if (buf) { int bytes; diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 63f6e38cc06..ccf74d23d0e 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -429,7 +429,7 @@ static HashTable* dom_get_debug_info_helper(zend_object *object, int *is_temp) / static HashTable* dom_get_debug_info(zend_object *object, int *is_temp) /* {{{ */ { - return dom_get_debug_info_helper(object, is_temp); + return dom_get_debug_info_helper(object, is_temp); } /* }}} */ @@ -440,7 +440,7 @@ void *php_dom_export_node(zval *object) /* {{{ */ intern = (php_libxml_node_object *) Z_DOMOBJ_P(object); if (intern->node) { - nodep = intern->node->node; + nodep = intern->node->node; } return nodep; @@ -1244,7 +1244,7 @@ int dom_hierarchy(xmlNodePtr parent, xmlNodePtr child) nodep = nodep->parent; } - return SUCCESS; + return SUCCESS; } /* }}} end dom_hierarchy */ diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index f601747b5bb..876d8b00dae 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -383,8 +383,8 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ } - ctxp->namespaces = ns; - ctxp->nsNr = nsnbr; + ctxp->namespaces = ns; + ctxp->nsNr = nsnbr; xpathobjp = xmlXPathEvalExpression((xmlChar *) expr, ctxp); ctxp->node = NULL; diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 7d5ebb9eb5c..74dba4bf698 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -134,12 +134,12 @@ ZEND_INI_MH(OnUpdateDecode) } PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("exif.encode_unicode", "ISO-8859-15", PHP_INI_ALL, OnUpdateEncode, encode_unicode, zend_exif_globals, exif_globals) - STD_PHP_INI_ENTRY("exif.decode_unicode_motorola", "UCS-2BE", PHP_INI_ALL, OnUpdateDecode, decode_unicode_be, zend_exif_globals, exif_globals) - STD_PHP_INI_ENTRY("exif.decode_unicode_intel", "UCS-2LE", PHP_INI_ALL, OnUpdateDecode, decode_unicode_le, zend_exif_globals, exif_globals) - STD_PHP_INI_ENTRY("exif.encode_jis", "", PHP_INI_ALL, OnUpdateEncode, encode_jis, zend_exif_globals, exif_globals) - STD_PHP_INI_ENTRY("exif.decode_jis_motorola", "JIS", PHP_INI_ALL, OnUpdateDecode, decode_jis_be, zend_exif_globals, exif_globals) - STD_PHP_INI_ENTRY("exif.decode_jis_intel", "JIS", PHP_INI_ALL, OnUpdateDecode, decode_jis_le, zend_exif_globals, exif_globals) + STD_PHP_INI_ENTRY("exif.encode_unicode", "ISO-8859-15", PHP_INI_ALL, OnUpdateEncode, encode_unicode, zend_exif_globals, exif_globals) + STD_PHP_INI_ENTRY("exif.decode_unicode_motorola", "UCS-2BE", PHP_INI_ALL, OnUpdateDecode, decode_unicode_be, zend_exif_globals, exif_globals) + STD_PHP_INI_ENTRY("exif.decode_unicode_intel", "UCS-2LE", PHP_INI_ALL, OnUpdateDecode, decode_unicode_le, zend_exif_globals, exif_globals) + STD_PHP_INI_ENTRY("exif.encode_jis", "", PHP_INI_ALL, OnUpdateEncode, encode_jis, zend_exif_globals, exif_globals) + STD_PHP_INI_ENTRY("exif.decode_jis_motorola", "JIS", PHP_INI_ALL, OnUpdateDecode, decode_jis_be, zend_exif_globals, exif_globals) + STD_PHP_INI_ENTRY("exif.decode_jis_intel", "JIS", PHP_INI_ALL, OnUpdateDecode, decode_jis_le, zend_exif_globals, exif_globals) PHP_INI_END() /* }}} */ @@ -4654,7 +4654,7 @@ PHP_FUNCTION(exif_read_data) exif_iif_add_int(&ImageInfo, SECTION_COMPUTED, "Thumbnail.Height", ImageInfo.Thumbnail.height); exif_iif_add_int(&ImageInfo, SECTION_COMPUTED, "Thumbnail.Width", ImageInfo.Thumbnail.width); } - EFREE_IF(sections_str); + EFREE_IF(sections_str); #ifdef EXIF_DEBUG exif_error_docref(NULL EXIFERR_CC, &ImageInfo, E_NOTICE, "Adding image infos"); @@ -4779,7 +4779,7 @@ PHP_FUNCTION(exif_imagetype) char *imagefile; size_t imagefile_len; php_stream * stream; - int itype = 0; + int itype = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &imagefile, &imagefile_len) == FAILURE) { RETURN_THROWS(); diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index bb13d8bfea2..4e30ec57714 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -382,7 +382,7 @@ static ffi_type *zend_ffi_get_type(zend_ffi_type *type) /* {{{ */ zend_ffi_type_kind kind = type->kind; again: - switch (kind) { + switch (kind) { case ZEND_FFI_TYPE_FLOAT: return &ffi_type_float; case ZEND_FFI_TYPE_DOUBLE: @@ -685,7 +685,7 @@ static zend_always_inline int zend_ffi_zval_to_cdata(void *ptr, zend_ffi_type *t zend_ffi_type_kind kind = type->kind; again: - switch (kind) { + switch (kind) { case ZEND_FFI_TYPE_FLOAT: dval = zval_get_double(value); *(float*)ptr = dval; @@ -1948,7 +1948,7 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp) return NULL; } - switch (type->kind) { + switch (type->kind) { case ZEND_FFI_TYPE_BOOL: case ZEND_FFI_TYPE_CHAR: case ZEND_FFI_TYPE_ENUM: @@ -2444,7 +2444,7 @@ static int zend_ffi_pass_arg(zval *arg, zend_ffi_type *type, ffi_type **pass_typ ZVAL_DEREF(arg); again: - switch (kind) { + switch (kind) { case ZEND_FFI_TYPE_FLOAT: dval = zval_get_double(arg); *pass_type = &ffi_type_float; @@ -3160,7 +3160,7 @@ static zend_ffi *zend_ffi_load(const char *filename, bool preload) /* {{{ */ if (fd < 0 || read(fd, code, code_size) != code_size) { if (preload) { zend_error(E_WARNING, "FFI: Failed pre-loading '%s', cannot read_file", filename); - } else { + } else { zend_throw_error(zend_ffi_exception_ce, "Failed loading '%s', cannot read_file", filename); } efree(code); @@ -4594,27 +4594,27 @@ static ZEND_COLD zend_never_inline void zend_bad_array_access(zend_class_entry * static ZEND_COLD zval *zend_fake_read_dimension(zend_object *obj, zval *offset, int type, zval *rv) /* {{{ */ { - zend_bad_array_access(obj->ce); + zend_bad_array_access(obj->ce); return NULL; } /* }}} */ static ZEND_COLD void zend_fake_write_dimension(zend_object *obj, zval *offset, zval *value) /* {{{ */ { - zend_bad_array_access(obj->ce); + zend_bad_array_access(obj->ce); } /* }}} */ static ZEND_COLD int zend_fake_has_dimension(zend_object *obj, zval *offset, int check_empty) /* {{{ */ { - zend_bad_array_access(obj->ce); + zend_bad_array_access(obj->ce); return 0; } /* }}} */ static ZEND_COLD void zend_fake_unset_dimension(zend_object *obj, zval *offset) /* {{{ */ { - zend_bad_array_access(obj->ce); + zend_bad_array_access(obj->ce); } /* }}} */ @@ -4626,28 +4626,28 @@ static ZEND_COLD zend_never_inline void zend_bad_property_access(zend_class_entr static ZEND_COLD zval *zend_fake_read_property(zend_object *obj, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ { - zend_bad_property_access(obj->ce); + zend_bad_property_access(obj->ce); return &EG(uninitialized_zval); } /* }}} */ static ZEND_COLD zval *zend_fake_write_property(zend_object *obj, zend_string *member, zval *value, void **cache_slot) /* {{{ */ { - zend_bad_array_access(obj->ce); - return value; + zend_bad_array_access(obj->ce); + return value; } /* }}} */ static ZEND_COLD int zend_fake_has_property(zend_object *obj, zend_string *member, int has_set_exists, void **cache_slot) /* {{{ */ { - zend_bad_array_access(obj->ce); + zend_bad_array_access(obj->ce); return 0; } /* }}} */ static ZEND_COLD void zend_fake_unset_property(zend_object *obj, zend_string *member, void **cache_slot) /* {{{ */ { - zend_bad_array_access(obj->ce); + zend_bad_array_access(obj->ce); } /* }}} */ diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 94533d0e203..37bded5233d 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -34,7 +34,7 @@ /* {{{ FETCH_DOUBLE_OPTION(var_name, option_name) */ #define FETCH_DOUBLE_OPTION(var_name, option_name) \ - var_name = 0; \ + var_name = 0; \ var_name##_set = 0; \ if (option_array) { \ if ((option_val = zend_hash_str_find(Z_ARRVAL_P(option_array), option_name, sizeof(option_name) - 1)) != NULL) { \ @@ -46,7 +46,7 @@ /* {{{ FETCH_LONG_OPTION(var_name, option_name) */ #define FETCH_LONG_OPTION(var_name, option_name) \ - var_name = 0; \ + var_name = 0; \ var_name##_set = 0; \ if (option_array) { \ if ((option_val = zend_hash_str_find(Z_ARRVAL_P(option_array), option_name, sizeof(option_name) - 1)) != NULL) { \ @@ -770,7 +770,7 @@ static int _php_filter_validate_ipv6(char *str, size_t str_len) /* {{{ */ /* check for bundled IPv4 */ ipv4 = memchr(str, '.', str_len); if (ipv4) { - while (ipv4 > str && *(ipv4-1) != ':') { + while (ipv4 > str && *(ipv4-1) != ':') { ipv4--; } diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 759314b1f25..ad256017148 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1428,8 +1428,8 @@ int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { int my_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) { - zend_long size, sent; - int n; + zend_long size, sent; + int n; size = len; while (size) { diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index b5a5b95e4da..315da803de6 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1856,7 +1856,7 @@ ZEND_FUNCTION(gmp_com) /* {{{ Finds next prime of a */ ZEND_FUNCTION(gmp_nextprime) { - gmp_unary_op(mpz_nextprime); + gmp_unary_op(mpz_nextprime); } /* }}} */ @@ -1883,10 +1883,10 @@ ZEND_FUNCTION(gmp_setbit) zend_argument_value_error(2, "must be greater than or equal to 0"); RETURN_THROWS(); } - if (index / GMP_NUMB_BITS >= INT_MAX) { + if (index / GMP_NUMB_BITS >= INT_MAX) { zend_argument_value_error(2, "must be less than %d * %d", INT_MAX, GMP_NUMB_BITS); RETURN_THROWS(); - } + } gmpnum_a = GET_GMP_FROM_ZVAL(a_arg); diff --git a/ext/hash/hash_joaat.c b/ext/hash/hash_joaat.c index 4374cc34fc4..328f9292c4c 100644 --- a/ext/hash/hash_joaat.c +++ b/ext/hash/hash_joaat.c @@ -79,14 +79,14 @@ PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[4], PHP_JOAAT_CTX * contex static uint32_t joaat_buf(void *buf, size_t len, uint32_t hval) { - size_t i; - unsigned char *input = (unsigned char *)buf; + size_t i; + unsigned char *input = (unsigned char *)buf; - for (i = 0; i < len; i++) { - hval += input[i]; - hval += (hval << 10); - hval ^= (hval >> 6); - } + for (i = 0; i < len; i++) { + hval += input[i]; + hval += (hval << 10); + hval ^= (hval >> 6); + } - return hval; + return hval; } diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 7161f7518df..4850c006242 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -412,14 +412,14 @@ static php_iconv_err_t _php_iconv_appendc(smart_str *d, const char c, iconv_t cd #ifdef ICONV_BROKEN_IGNORE static int _php_check_ignore(const char *charset) { - size_t clen = strlen(charset); - if (clen >= 9 && strcmp("//IGNORE", charset+clen-8) == 0) { - return 1; - } - if (clen >= 19 && strcmp("//IGNORE//TRANSLIT", charset+clen-18) == 0) { - return 1; - } - return 0; + size_t clen = strlen(charset); + if (clen >= 9 && strcmp("//IGNORE", charset+clen-8) == 0) { + return 1; + } + if (clen >= 19 && strcmp("//IGNORE//TRANSLIT", charset+clen-18) == 0) { + return 1; + } + return 0; } #else #define _php_check_ignore(x) (0) diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 5a5d4d6aaed..c3d54e8a84a 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -72,15 +72,15 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, zend_ char chars[127]; int8_t chars_len = sizeof(chars); UErrorCode uerror = U_ZERO_ERROR; - if(!objval->src) { - php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Source Converter has not been initialized yet"); + if(!objval->src) { + php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Source Converter has not been initialized yet"); chars[0] = 0x1A; chars[1] = 0; chars_len = 1; ZEND_TRY_ASSIGN_REF_LONG(error, U_INVALID_STATE_ERROR); - RETVAL_STRINGL(chars, chars_len); - return; - } + RETVAL_STRINGL(chars, chars_len); + return; + } /* Yes, this is fairly wasteful at first glance, * but considering that the alternative is to store @@ -197,7 +197,7 @@ static void php_converter_append_toUnicode_target(zval *val, UConverterToUnicode } default: php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR, - "toUCallback() specified illegal type for substitution character"); + "toUCallback() specified illegal type for substitution character"); } } /* }}} */ @@ -345,7 +345,7 @@ static inline bool php_converter_set_callbacks(php_converter_object *objval, UCo } ucnv_setToUCallBack(cnv, (UConverterToUCallback)php_converter_to_u_callback, (const void*)objval, - NULL, NULL, &error); + NULL, NULL, &error); if (U_FAILURE(error)) { THROW_UFAILURE(objval, "ucnv_setToUCallBack", error); ret = 0; @@ -353,7 +353,7 @@ static inline bool php_converter_set_callbacks(php_converter_object *objval, UCo error = U_ZERO_ERROR; ucnv_setFromUCallBack(cnv, (UConverterFromUCallback)php_converter_from_u_callback, (const void*)objval, - NULL, NULL, &error); + NULL, NULL, &error); if (U_FAILURE(error)) { THROW_UFAILURE(objval, "ucnv_setFromUCallBack", error); ret = 0; @@ -364,9 +364,8 @@ static inline bool php_converter_set_callbacks(php_converter_object *objval, UCo /* {{{ php_converter_set_encoding */ static bool php_converter_set_encoding(php_converter_object *objval, - UConverter **pcnv, - const char *enc, size_t enc_len - ) { + UConverter **pcnv, + const char *enc, size_t enc_len) { UErrorCode error = U_ZERO_ERROR; UConverter *cnv = ucnv_open(enc, &error); @@ -461,8 +460,8 @@ PHP_METHOD(UConverter, getSourceEncoding) { /* {{{ */ PHP_METHOD(UConverter, getDestinationEncoding) { - php_converter_object *objval = CONV_GET(ZEND_THIS); - php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); + php_converter_object *objval = CONV_GET(ZEND_THIS); + php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); } /* }}} */ @@ -701,7 +700,7 @@ PHP_METHOD(UConverter, reasonText) { /* {{{ */ PHP_METHOD(UConverter, convert) { - php_converter_object *objval = CONV_GET(ZEND_THIS); + php_converter_object *objval = CONV_GET(ZEND_THIS); char *str; size_t str_len; zend_string *ret; diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index a1edb07c49f..05c5e90fbda 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -739,7 +739,7 @@ PHP_FUNCTION(grapheme_extract) ZVAL_DEREF(next); /* initialize next */ zval_ptr_dtor(next); - ZVAL_LONG(next, lstart); + ZVAL_LONG(next, lstart); } } @@ -794,7 +794,7 @@ PHP_FUNCTION(grapheme_extract) */ if ( -1 != grapheme_ascii_check((unsigned char *)pstr, MIN(size + 1, str_len)) ) { - size_t nsize = MIN(size, str_len); + size_t nsize = MIN(size, str_len); if ( NULL != next ) { ZVAL_LONG(next, start+nsize); } diff --git a/ext/intl/grapheme/grapheme_util.c b/ext/intl/grapheme/grapheme_util.c index 606a6e75cda..4e1416d1beb 100644 --- a/ext/intl/grapheme/grapheme_util.c +++ b/ext/intl/grapheme/grapheme_util.c @@ -50,39 +50,39 @@ grapheme_close_global_iterator( void ) void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t l, char **sub_str, int32_t *sub_str_len) { int32_t str_len2 = (int32_t)str_len; /* in order to avoid signed/unsigned problems */ - *sub_str = NULL; + *sub_str = NULL; - if(str_len > INT32_MAX) { - /* We can not return long strings from ICU functions, so we won't here too */ - return; - } + if(str_len > INT32_MAX) { + /* We can not return long strings from ICU functions, so we won't here too */ + return; + } - /* if "from" position is negative, count start position from the end - * of the string - */ - if (f < 0) { - f = str_len2 + f; - if (f < 0) { - f = 0; - } - } else if (f > str_len2) { + /* if "from" position is negative, count start position from the end + * of the string + */ + if (f < 0) { + f = str_len2 + f; + if (f < 0) { + f = 0; + } + } else if (f > str_len2) { f = str_len2; } - /* if "length" position is negative, set it to the length - * needed to stop that many chars from the end of the string - */ - if (l < 0) { - l = (str_len2 - f) + l; - if (l < 0) { - l = 0; - } - } else if (l > str_len2 - f) { + /* if "length" position is negative, set it to the length + * needed to stop that many chars from the end of the string + */ + if (l < 0) { + l = (str_len2 - f) + l; + if (l < 0) { + l = 0; + } + } else if (l > str_len2 - f) { l = str_len2 - f; } - *sub_str = str + f; - *sub_str_len = l; + *sub_str = str + f; + *sub_str_len = l; } /* }}} */ @@ -317,8 +317,7 @@ int32_t grapheme_get_haystack_offset(UBreakIterator* bi, int32_t offset) /* }}} */ /* {{{ grapheme_strrpos_ascii: borrowed from the php ext/standard/string.c */ - zend_long -grapheme_strrpos_ascii(char *haystack, size_t haystack_len, char *needle, size_t needle_len, int32_t offset) +zend_long grapheme_strrpos_ascii(char *haystack, size_t haystack_len, char *needle, size_t needle_len, int32_t offset) { char *p, *e; diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 73023b32f39..1782dd6ecb4 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -392,7 +392,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) if(zend_parse_parameters( ZEND_NUM_ARGS(), "s", &loc_name ,&loc_name_len ) == FAILURE) { RETURN_THROWS(); - } + } if(loc_name_len == 0) { loc_name = intl_locale_get_default(); @@ -473,7 +473,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME zend_string* u8str; - char* msg = NULL; + char* msg = NULL; intl_error_reset( NULL ); @@ -484,13 +484,13 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME RETURN_THROWS(); } - if(loc_name_len > ULOC_FULLNAME_CAPACITY) { - /* See bug 67397: overlong locale names cause trouble in uloc_getDisplayName */ + if(loc_name_len > ULOC_FULLNAME_CAPACITY) { + /* See bug 67397: overlong locale names cause trouble in uloc_getDisplayName */ spprintf(&msg , 0, "locale_get_display_%s : name too long", tag_name ); intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, msg , 1 ); efree(msg); RETURN_FALSE; - } + } if(loc_name_len == 0) { loc_name = intl_locale_get_default(); @@ -519,10 +519,10 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME free_loc_name = 1; } - /* Get the disp_value for the given locale */ - do{ - disp_name = erealloc( disp_name , buflen * sizeof(UChar) ); - disp_name_len = buflen; + /* Get the disp_value for the given locale */ + do{ + disp_name = erealloc( disp_name , buflen * sizeof(UChar) ); + disp_name_len = buflen; if( strcmp(tag_name , LOC_LANG_TAG)==0 ){ buflen = uloc_getDisplayLanguage ( mod_loc_name , disp_loc_name , disp_name , disp_name_len , &status); @@ -587,28 +587,28 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME /* {{{ gets the name for the $locale in $in_locale or default_locale */ PHP_FUNCTION(locale_get_display_name) { - get_icu_disp_value_src_php( DISP_NAME , INTERNAL_FUNCTION_PARAM_PASSTHRU ); + get_icu_disp_value_src_php( DISP_NAME , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the language for the $locale in $in_locale or default_locale */ PHP_FUNCTION(locale_get_display_language) { - get_icu_disp_value_src_php( LOC_LANG_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); + get_icu_disp_value_src_php( LOC_LANG_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the script for the $locale in $in_locale or default_locale */ PHP_FUNCTION(locale_get_display_script) { - get_icu_disp_value_src_php( LOC_SCRIPT_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); + get_icu_disp_value_src_php( LOC_SCRIPT_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the region for the $locale in $in_locale or default_locale */ PHP_FUNCTION(locale_get_display_region) { - get_icu_disp_value_src_php( LOC_REGION_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); + get_icu_disp_value_src_php( LOC_REGION_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ @@ -622,7 +622,7 @@ PHP_FUNCTION(locale_get_display_region) */ PHP_FUNCTION(locale_get_display_variant) { - get_icu_disp_value_src_php( LOC_VARIANT_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); + get_icu_disp_value_src_php( LOC_VARIANT_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ @@ -634,33 +634,32 @@ PHP_FUNCTION(locale_get_display_variant) */ PHP_FUNCTION( locale_get_keywords ) { - UEnumeration* e = NULL; - UErrorCode status = U_ZERO_ERROR; + UEnumeration* e = NULL; + UErrorCode status = U_ZERO_ERROR; - const char* kw_key = NULL; - int32_t kw_key_len = 0; + const char* kw_key = NULL; + int32_t kw_key_len = 0; - const char* loc_name = NULL; - size_t loc_name_len = 0; + const char* loc_name = NULL; + size_t loc_name_len = 0; - intl_error_reset( NULL ); + intl_error_reset( NULL ); - if(zend_parse_parameters( ZEND_NUM_ARGS(), "s", - &loc_name, &loc_name_len ) == FAILURE) - { - RETURN_THROWS(); - } + if(zend_parse_parameters( ZEND_NUM_ARGS(), "s", + &loc_name, &loc_name_len ) == FAILURE) + { + RETURN_THROWS(); + } INTL_CHECK_LOCALE_LEN(strlen(loc_name)); - if(loc_name_len == 0) { - loc_name = intl_locale_get_default(); - } + if(loc_name_len == 0) { + loc_name = intl_locale_get_default(); + } /* Get the keywords */ - e = uloc_openKeywords( loc_name, &status ); - if( e != NULL ) - { + e = uloc_openKeywords( loc_name, &status ); + if( e != NULL ) { /* ICU expects the buffer to be allocated before calling the function and so the buffer size has been explicitly specified @@ -669,10 +668,10 @@ PHP_FUNCTION( locale_get_keywords ) */ /* Traverse it, filling the return array. */ - array_init( return_value ); + array_init( return_value ); - while( ( kw_key = uenum_next( e, &kw_key_len, &status ) ) != NULL ){ - int32_t kw_value_len = 100; + while( ( kw_key = uenum_next( e, &kw_key_len, &status ) ) != NULL ){ + int32_t kw_value_len = 100; zend_string *kw_value_str = zend_string_alloc(kw_value_len, 0); /* Get the keyword value for each keyword */ @@ -690,15 +689,15 @@ PHP_FUNCTION( locale_get_keywords ) zend_string_efree( kw_value_str ); } zend_array_destroy(Z_ARR_P(return_value)); - RETURN_FALSE; + RETURN_FALSE; } - add_assoc_str( return_value, (char *)kw_key, kw_value_str); + add_assoc_str( return_value, (char *)kw_key, kw_value_str); } /* end of while */ } /* end of if e!=NULL */ - uenum_close( e ); + uenum_close( e ); } /* }}} */ @@ -1032,23 +1031,23 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name) /* {{{ parses a locale-id into an array the different parts of it */ PHP_FUNCTION(locale_parse) { - const char* loc_name = NULL; - size_t loc_name_len = 0; - int grOffset = 0; + const char* loc_name = NULL; + size_t loc_name_len = 0; + int grOffset = 0; - intl_error_reset( NULL ); + intl_error_reset( NULL ); - if(zend_parse_parameters( ZEND_NUM_ARGS(), "s", - &loc_name, &loc_name_len ) == FAILURE) - { - RETURN_THROWS(); - } + if(zend_parse_parameters( ZEND_NUM_ARGS(), "s", + &loc_name, &loc_name_len ) == FAILURE) + { + RETURN_THROWS(); + } - INTL_CHECK_LOCALE_LEN(strlen(loc_name)); + INTL_CHECK_LOCALE_LEN(strlen(loc_name)); - if(loc_name_len == 0) { - loc_name = intl_locale_get_default(); - } + if(loc_name_len == 0) { + loc_name = intl_locale_get_default(); + } array_init( return_value ); @@ -1108,7 +1107,7 @@ PHP_FUNCTION(locale_get_all_variants) add_next_index_stringl( return_value, token , strlen(token)); /* tokenize on the "_" or "-" and stop at singleton if any */ while( (token = php_strtok_r(NULL , DELIMITER, &saved_ptr)) && (strlen(token)>1) ){ - add_next_index_stringl( return_value, token , strlen(token)); + add_next_index_stringl( return_value, token , strlen(token)); } } if( variant ){ @@ -1127,27 +1126,27 @@ static int strToMatch(const char* str ,char *retstr) const char* anchor1 = NULL; int result = 0; - if( (!str) || str[0] == '\0'){ - return result; - } else { - anchor = retstr; - anchor1 = str; - while( (*str)!='\0' ){ - if( *str == '-' ){ - *retstr = '_'; - } else { - *retstr = tolower(*str); + if( (!str) || str[0] == '\0'){ + return result; + } else { + anchor = retstr; + anchor1 = str; + while( (*str)!='\0' ){ + if( *str == '-' ){ + *retstr = '_'; + } else { + *retstr = tolower(*str); + } + str++; + retstr++; } - str++; - retstr++; + *retstr = '\0'; + retstr= anchor; + str= anchor1; + result = 1; } - *retstr = '\0'; - retstr= anchor; - str= anchor1; - result = 1; - } - return(result); + return(result); } /* }}} */ diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c index 3f2b1f25edb..e16e2ef5d62 100644 --- a/ext/intl/normalizer/normalizer_normalize.c +++ b/ext/intl/normalizer/normalizer_normalize.c @@ -306,10 +306,10 @@ PHP_FUNCTION( normalizer_get_raw_decomposition ) UChar32 codepoint = -1; int32_t offset = 0; - UErrorCode status = U_ZERO_ERROR; - const UNormalizer2 *norm; - UChar decomposition[32]; - int32_t decomposition_length; + UErrorCode status = U_ZERO_ERROR; + const UNormalizer2 *norm; + UChar decomposition[32]; + int32_t decomposition_length; zend_long form = NORMALIZER_DEFAULT; diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index d64da7d8c70..5826c2e3372 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -98,8 +98,8 @@ const char *intl_locale_get_default( void ) /* {{{ INI Settings */ PHP_INI_BEGIN() - STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals) - STD_PHP_INI_ENTRY("intl.error_level", "0", PHP_INI_ALL, OnUpdateLong, error_level, zend_intl_globals, intl_globals) + STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals) + STD_PHP_INI_ENTRY("intl.error_level", "0", PHP_INI_ALL, OnUpdateLong, error_level, zend_intl_globals, intl_globals) STD_PHP_INI_BOOLEAN("intl.use_exceptions", "0", PHP_INI_ALL, OnUpdateBool, use_exceptions, zend_intl_globals, intl_globals) PHP_INI_END() /* }}} */ @@ -250,15 +250,15 @@ PHP_MINIT_FUNCTION( intl ) PHP_MSHUTDOWN_FUNCTION( intl ) { const char *cleanup; - /* For the default locale php.ini setting */ - UNREGISTER_INI_ENTRIES(); + /* For the default locale php.ini setting */ + UNREGISTER_INI_ENTRIES(); cleanup = getenv(EXPLICIT_CLEANUP_ENV_VAR); - if (cleanup != NULL && !(cleanup[0] == '0' && cleanup[1] == '\0')) { + if (cleanup != NULL && !(cleanup[0] == '0' && cleanup[1] == '\0')) { u_cleanup(); - } + } - return SUCCESS; + return SUCCESS; } /* }}} */ @@ -306,7 +306,7 @@ PHP_MINFO_FUNCTION( intl ) php_info_print_table_row( 2, "ICU Unicode version", U_UNICODE_VERSION ); php_info_print_table_end(); - /* For the default locale php.ini setting */ - DISPLAY_INI_ENTRIES() ; + /* For the default locale php.ini setting */ + DISPLAY_INI_ENTRIES() ; } /* }}} */ diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index 9738b2b2fcc..589572024f0 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -167,8 +167,8 @@ static void resourcebundle_array_fetch(zend_object *object, zval *offset, zval * { int32_t meindex = 0; char * mekey = NULL; - bool is_numeric = 0; - char *pbuf; + bool is_numeric = 0; + char *pbuf; ResourceBundle_object *rb; rb = php_intl_resourcebundle_fetch_object(object); diff --git a/ext/intl/spoofchecker/spoofchecker_class.c b/ext/intl/spoofchecker/spoofchecker_class.c index 493bc709449..ed343ec1bed 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.c +++ b/ext/intl/spoofchecker/spoofchecker_class.c @@ -66,8 +66,8 @@ static zend_object *spoofchecker_clone_obj(zend_object *object) /* {{{ */ zend_object *new_obj_val; Spoofchecker_object *sfo, *new_sfo; - sfo = php_intl_spoofchecker_fetch_object(object); - intl_error_reset(SPOOFCHECKER_ERROR_P(sfo)); + sfo = php_intl_spoofchecker_fetch_object(object); + intl_error_reset(SPOOFCHECKER_ERROR_P(sfo)); new_obj_val = Spoofchecker_ce_ptr->create_object(object->ce); new_sfo = php_intl_spoofchecker_fetch_object(new_obj_val); diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c index 9c4034bb4ef..9552adaf158 100644 --- a/ext/intl/transliterator/transliterator_class.c +++ b/ext/intl/transliterator/transliterator_class.c @@ -114,7 +114,7 @@ static zend_object *Transliterator_object_create( zend_class_entry *ce ) intern = zend_object_alloc(sizeof(Transliterator_object), ce); zend_object_std_init( &intern->zo, ce ); - object_properties_init( &intern->zo, ce ); + object_properties_init( &intern->zo, ce ); transliterator_object_init( intern ); intern->zo.handlers = &Transliterator_handlers; diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c index 0aeeb6a8e3a..0a84d40079a 100644 --- a/ext/intl/transliterator/transliterator_methods.c +++ b/ext/intl/transliterator/transliterator_methods.c @@ -179,7 +179,7 @@ PHP_FUNCTION( transliterator_create_from_rules ) } zval_ptr_dtor( return_value ); RETURN_NULL(); - } + } transliterator_object_construct( object, utrans, TRANSLITERATOR_ERROR_CODE_P( to ) ); /* no need to close the transliterator manually on construction error */ INTL_METHOD_CHECK_STATUS_OR_NULL( to, "transliterator_create_from_rules: internal constructor call failed" ); diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index ce7c01884eb..f977e8c80c6 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -105,9 +105,9 @@ MBSTRING_API int php_unicode_is_prop(unsigned long code, ...) } static inline unsigned mph_hash(unsigned d, unsigned x) { - x ^= d; - x = ((x >> 16) ^ x) * 0x45d9f3b; - return x; + x ^= d; + x = ((x >> 16) ^ x) * 0x45d9f3b; + return x; } #define CODE_NOT_FOUND ((unsigned) -1) diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index 1e1bdb0c642..2634523cd74 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -44,7 +44,7 @@ if (!obj->ptr || !(MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr) { \ return FAILURE; \ } else { \ CHECK_STATUS(statusval, quiet);\ - p = (MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->mysql;\ + p = (MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->mysql;\ } #define MYSQLI_GET_RESULT(statusval) \ @@ -173,8 +173,8 @@ static int link_affected_rows_read(mysqli_object *obj, zval *retval, bool quiet) CHECK_STATUS(MYSQLI_STATUS_VALID, quiet); - mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; - ZEND_ASSERT(mysql); + mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; + ZEND_ASSERT(mysql); rc = mysql_affected_rows(mysql->mysql); @@ -200,7 +200,7 @@ static int link_error_list_read(mysqli_object *obj, zval *retval, bool quiet) CHECK_STATUS(MYSQLI_STATUS_VALID, quiet); - mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; + mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; if (mysql) { array_init(retval); @@ -260,7 +260,7 @@ static int result_type_read(mysqli_object *obj, zval *retval, bool quiet) MYSQL_RES *p; CHECK_STATUS(MYSQLI_STATUS_VALID, quiet); - p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; + p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; ZEND_ASSERT(p); ZVAL_LONG(retval, mysqli_result_is_unbuffered(p) ? MYSQLI_USE_RESULT:MYSQLI_STORE_RESULT); @@ -312,7 +312,7 @@ static int stmt_id_read(mysqli_object *obj, zval *retval, bool quiet) CHECK_STATUS(MYSQLI_STATUS_VALID, quiet); - p = (MY_STMT*)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; + p = (MY_STMT*)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; ZEND_ASSERT(p); ZVAL_LONG(retval, mysqli_stmt_get_id(p->stmt)); @@ -329,7 +329,7 @@ static int stmt_affected_rows_read(mysqli_object *obj, zval *retval, bool quiet) CHECK_STATUS(MYSQLI_STATUS_VALID, quiet); - p = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; + p = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; ZEND_ASSERT(p); rc = mysql_stmt_affected_rows(p->stmt); @@ -356,7 +356,7 @@ static int stmt_error_list_read(mysqli_object *obj, zval *retval, bool quiet) CHECK_STATUS(MYSQLI_STATUS_INITIALIZED, quiet); - stmt = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; + stmt = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; if (stmt && stmt->stmt) { array_init(retval); #ifdef MYSQLI_USE_MYSQLND diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 9c18570cb63..42b63f8e67c 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -424,9 +424,9 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn, auth_packet.auth_data_len = auth_plugin_data_len; auth_packet.auth_plugin_name = auth_protocol; - if (conn->server_capabilities & CLIENT_CONNECT_ATTRS) { + if (conn->server_capabilities & CLIENT_CONNECT_ATTRS) { auth_packet.connect_attr = conn->options->connect_attr; - } + } if (conn->m->get_server_version(conn) >= 50123) { auth_packet.charset_no = conn->charset->nr; diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index b1584058df0..a44cc0da2ee 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -410,7 +410,7 @@ static unsigned int check_mb_utf16(const char * const start, const char * const static uint32_t mysqlnd_mbcharlen_utf16(const unsigned int utf16) { - return UTF16_HIGH_HEAD(utf16) ? 4 : 2; + return UTF16_HIGH_HEAD(utf16) ? 4 : 2; } /* }}} */ diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 8ca72649717..8762c22f9ed 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -514,7 +514,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA * } #endif - if (conn->options->connect_attr && zend_hash_num_elements(conn->options->connect_attr)) { + if (conn->options->connect_attr && zend_hash_num_elements(conn->options->connect_attr)) { mysql_flags |= CLIENT_CONNECT_ATTRS; } @@ -814,9 +814,9 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn_handle, if (PASS == conn->m->local_tx_start(conn, this_func)) { mysqlnd_options4(conn_handle, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_name", "mysqlnd"); - if (hostname.l > 0) { - mysqlnd_options4(conn_handle, MYSQL_OPT_CONNECT_ATTR_ADD, "_server_host", hostname.s); - } + if (hostname.l > 0) { + mysqlnd_options4(conn_handle, MYSQL_OPT_CONNECT_ATTR_ADD, "_server_host", hostname.s); + } ret = conn->m->connect(conn, hostname, username, password, database, port, socket_or_pipe, mysql_flags); conn->m->local_tx_end(conn, this_func, FAIL); diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index c19ee8e8133..3b38d86273b 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -237,14 +237,14 @@ ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, const unsigned int p t.time_type = MYSQLND_TIMESTAMP_TIME; } - if (field->decimals > 0 && field->decimals < 7) { - ZVAL_STR(zv, zend_strpprintf(0, "%s%02u:%02u:%02u.%0*u", + if (field->decimals > 0 && field->decimals < 7) { + ZVAL_STR(zv, zend_strpprintf(0, "%s%02u:%02u:%02u.%0*u", (t.neg ? "-" : ""), t.hour, t.minute, t.second, field->decimals, (uint32_t) (t.second_part / pow(10, 6 - field->decimals)))); - } else { - ZVAL_STR(zv, zend_strpprintf(0, "%s%02u:%02u:%02u", + } else { + ZVAL_STR(zv, zend_strpprintf(0, "%s%02u:%02u:%02u", (t.neg ? "-" : ""), t.hour, t.minute, t.second)); - } + } DBG_VOID_RETURN; } /* }}} */ @@ -315,14 +315,14 @@ ps_fetch_datetime(zval * zv, const MYSQLND_FIELD * const field, const unsigned i t.time_type = MYSQLND_TIMESTAMP_DATETIME; } - if (field->decimals > 0 && field->decimals < 7) { + if (field->decimals > 0 && field->decimals < 7) { ZVAL_STR(zv, zend_strpprintf(0, "%04u-%02u-%02u %02u:%02u:%02u.%0*u", t.year, t.month, t.day, t.hour, t.minute, t.second, field->decimals, (uint32_t) (t.second_part / pow(10, 6 - field->decimals)))); - } else { + } else { ZVAL_STR(zv, zend_strpprintf(0, "%04u-%02u-%02u %02u:%02u:%02u", t.year, t.month, t.day, t.hour, t.minute, t.second)); - } + } DBG_VOID_RETURN; } /* }}} */ diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 78ccb3123dc..5df121cd36a 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -417,7 +417,7 @@ php_mysqlnd_greet_read(MYSQLND_CONN_DATA * conn, void * _packet) /* backtrack one byte, the 0x0 at the end of the scramble in 5.1 and previous */ p--; - /* Additional 16 bits for server capabilities */ + /* Additional 16 bits for server capabilities */ DBG_INF_FMT("additional 5.5+ caps=%u\n", (uint32_t) uint2korr(pad_start)); packet->server_capabilities |= ((uint32_t) uint2korr(pad_start)) << 16; /* And a length of the server scramble in one byte */ diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 3163c50291c..9bc2e876c9c 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -640,7 +640,7 @@ void php_oci_define_hash_dtor(zval *data) zval_ptr_dtor(&define->val); - efree(define); + efree(define); } /* }}} */ @@ -1885,7 +1885,7 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg } else { RETURN_FALSE; } - } + } #endif /* OCI_MAJOR_VERSION */ if (placeholder == NULL) { @@ -2046,7 +2046,7 @@ static php_oci_spool *php_oci_create_spool(char *username, int username_len, cha OCI_G(errcode) = php_oci_error(OCI_G(err), errstatus); iserror = 1; goto exit_create_spool; - } + } /* }}} */ /* {{{ Set the edition attribute on the auth handle */ diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c index 0b93d81b789..d8eb51a6ef1 100644 --- a/ext/oci8/oci8_lob.c +++ b/ext/oci8/oci8_lob.c @@ -663,8 +663,8 @@ void php_oci_lob_free (php_oci_descriptor *descriptor) if (zend_hash_num_elements(descriptor->connection->descriptors) == 0) { descriptor->connection->descriptor_count = 0; } else { - /* delete descriptor from the hash */ - zend_hash_index_del(descriptor->connection->descriptors, descriptor->index); + /* delete descriptor from the hash */ + zend_hash_index_del(descriptor->connection->descriptors, descriptor->index); if (descriptor->index + 1 == descriptor->connection->descriptor_count) { /* If the descriptor being freed is the end-most one * allocated, then the descriptor_count is reduced so @@ -752,7 +752,7 @@ int php_oci_lob_import (php_oci_descriptor *descriptor, char *filename) return 0; } - /* }}} */ +/* }}} */ /* {{{ php_oci_lob_append() Append data to the end of the LOB */ diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 5a2fded9a23..e76f8a54002 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -258,7 +258,7 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows) if (statement->has_descr && statement->columns) { zend_hash_apply(statement->columns, php_oci_cleanup_pre_fetch); - } + } #if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2))) PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch2, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, 0, OCI_DEFAULT)); diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index d3e949cf4e7..a99785985ff 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1150,7 +1150,7 @@ PHP_FUNCTION(odbc_cursor) SQLUSMALLINT max_len; SQLSMALLINT len; char *cursorname; - odbc_result *result; + odbc_result *result; RETCODE rc; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pv_res) == FAILURE) { @@ -2063,7 +2063,7 @@ PHP_FUNCTION(odbc_result_all) break; } } - php_printf("\n"); + php_printf("\n"); #ifdef HAVE_SQL_EXTENDED_FETCH if (result->fetch_abs) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 5cfa5040e45..a301888815b 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -214,7 +214,7 @@ static inline zend_string* accel_getcwd(void) void zend_accel_schedule_restart_if_necessary(zend_accel_restart_reason reason) { if ((((double) ZSMMG(wasted_shared_memory)) / ZCG(accel_directives).memory_consumption) >= ZCG(accel_directives).max_wasted_percentage) { - zend_accel_schedule_restart(reason); + zend_accel_schedule_restart(reason); } } @@ -936,7 +936,7 @@ static accel_time_t zend_get_file_handle_timestamp_win(zend_file_handle *file_ha SystemTimeToFileTime (&st, &utc_base_ft); utc_base = (((unsigned __int64)utc_base_ft.dwHighDateTime) << 32) + utc_base_ft.dwLowDateTime; - } + } if (file_handle->opened_path && GetFileAttributesEx(file_handle->opened_path->val, GetFileExInfoStandard, &fdata) != 0) { unsigned __int64 ftime; @@ -1145,16 +1145,16 @@ zend_string *accel_make_persistent_key(zend_string *str) ZSTR_LEN(&ZCG(key)) = 0; /* CWD and include_path don't matter for absolute file names and streams */ - if (IS_ABSOLUTE_PATH(path, path_length)) { + if (IS_ABSOLUTE_PATH(path, path_length)) { /* pass */ - } else if (UNEXPECTED(is_stream_path(path))) { + } else if (UNEXPECTED(is_stream_path(path))) { if (!is_cacheable_stream_path(path)) { return NULL; } /* pass */ - } else if (UNEXPECTED(!ZCG(accel_directives).use_cwd)) { + } else if (UNEXPECTED(!ZCG(accel_directives).use_cwd)) { /* pass */ - } else { + } else { const char *include_path = NULL, *cwd = NULL; int include_path_len = 0, cwd_len = 0; zend_string *parent_script = NULL; @@ -1703,9 +1703,9 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl accel_time_t timestamp = 0; uint32_t orig_compiler_options = 0; - /* Try to open file */ - if (file_handle->type == ZEND_HANDLE_FILENAME) { - if (accelerator_orig_zend_stream_open_function(file_handle) != SUCCESS) { + /* Try to open file */ + if (file_handle->type == ZEND_HANDLE_FILENAME) { + if (accelerator_orig_zend_stream_open_function(file_handle) != SUCCESS) { *op_array_p = NULL; if (!EG(exception)) { if (type == ZEND_REQUIRE) { @@ -1715,8 +1715,8 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl } } return NULL; - } - } + } + } /* check blacklist right after ensuring that file was opened */ if (file_handle->opened_path && zend_accel_blacklist_is_blacklisted(&accel_blacklist, ZSTR_VAL(file_handle->opened_path), ZSTR_LEN(file_handle->opened_path))) { @@ -1824,8 +1824,8 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl efree(op_array); /* we have valid persistent_script, so it's safe to free op_array */ - /* Fill in the ping_auto_globals_mask for the new script. If jit for auto globals is enabled we - will have to ping the used auto global variables before execution */ + /* Fill in the ping_auto_globals_mask for the new script. If jit for auto globals is enabled we + will have to ping the used auto global variables before execution */ if (PG(auto_globals_jit)) { new_persistent_script->ping_auto_globals_mask = zend_accel_get_auto_globals(); } @@ -1924,27 +1924,26 @@ zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int type) int check_persistent_script_access(zend_persistent_script *persistent_script) { - char *phar_path, *ptr; - int ret; - if ((ZSTR_LEN(persistent_script->script.filename)script.filename), "phar://", sizeof("phar://")-1)) { + char *phar_path, *ptr; + int ret; + if ((ZSTR_LEN(persistent_script->script.filename)script.filename), "phar://", sizeof("phar://")-1)) { - return access(ZSTR_VAL(persistent_script->script.filename), R_OK) != 0; + return access(ZSTR_VAL(persistent_script->script.filename), R_OK) != 0; - } else { - /* we got a cached file from .phar, so we have to strip prefix and path inside .phar to check access() */ - phar_path = estrdup(ZSTR_VAL(persistent_script->script.filename)+sizeof("phar://")-1); - if ((ptr = strstr(phar_path, ".phar/")) != NULL) - { - *(ptr+sizeof(".phar/")-2) = 0; /* strip path inside .phar file */ - } - ret = access(phar_path, R_OK) != 0; - efree(phar_path); - return ret; - } + } else { + /* we got a cached file from .phar, so we have to strip prefix and path inside .phar to check access() */ + phar_path = estrdup(ZSTR_VAL(persistent_script->script.filename)+sizeof("phar://")-1); + if ((ptr = strstr(phar_path, ".phar/")) != NULL) + { + *(ptr+sizeof(".phar/")-2) = 0; /* strip path inside .phar file */ + } + ret = access(phar_path, R_OK) != 0; + efree(phar_path); + return ret; + } } - /* zend_compile() replacement */ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) { @@ -2160,9 +2159,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) SHM_UNPROTECT(); /* Try and cache the script and assume that it is returned from_shared_memory. - * If it isn't compile_and_cache_file() changes the flag to 0 - */ - from_shared_memory = 0; + * If it isn't compile_and_cache_file() changes the flag to 0 + */ + from_shared_memory = 0; if (persistent_script) { persistent_script = cache_script_in_shared_memory(persistent_script, key, &from_shared_memory); } @@ -2228,8 +2227,8 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) SHM_PROTECT(); HANDLE_UNBLOCK_INTERRUPTIONS(); - /* Fetch jit auto globals used in the script before execution */ - if (persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)) { + /* Fetch jit auto globals used in the script before execution */ + if (persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)) { zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)); } @@ -2324,7 +2323,7 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce, ZEND_ASSERT(ce->ce_flags & ZEND_ACC_LINKED); if (!ZCG(accelerator_enabled) || - (ZCSG(restart_in_progress) && accel_restart_is_active())) { + (ZCSG(restart_in_progress) && accel_restart_is_active())) { return NULL; } @@ -2781,8 +2780,8 @@ static int accelerator_remove_cb(zend_extension *element1, zend_extension *eleme element1->op_array_handler = NULL; #ifdef __DEBUG_MESSAGES__ - fprintf(stderr, ACCELERATOR_PRODUCT_NAME " is disabled: %s\n", (zps_failure_reason ? zps_failure_reason : "unknown error")); - fflush(stderr); + fprintf(stderr, ACCELERATOR_PRODUCT_NAME " is disabled: %s\n", (zps_failure_reason ? zps_failure_reason : "unknown error")); + fflush(stderr); #endif } @@ -3457,7 +3456,7 @@ static void preload_shutdown(void) zval *zv; #if 0 - if (EG(zend_constants)) { + if (EG(zend_constants)) { ZEND_HASH_REVERSE_FOREACH_VAL(EG(zend_constants), zv) { zend_constant *c = Z_PTR_P(zv); if (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) { @@ -3467,7 +3466,7 @@ static void preload_shutdown(void) } #endif - if (EG(function_table)) { + if (EG(function_table)) { ZEND_HASH_REVERSE_FOREACH_VAL(EG(function_table), zv) { zend_function *func = Z_PTR_P(zv); if (func->type == ZEND_INTERNAL_FUNCTION) { @@ -5094,7 +5093,7 @@ ZEND_EXT_API zend_extension zend_extension_entry = { NULL, /* shutdown */ NULL, /* per-script activation */ #ifdef HAVE_JIT - accel_deactivate, /* per-script deactivation */ + accel_deactivate, /* per-script deactivation */ #else NULL, /* per-script deactivation */ #endif diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 73eed50ee05..50bc302f227 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -1280,7 +1280,7 @@ static int zend_jit_op_array_analyze1(const zend_op_array *op_array, zend_script } #endif - /* TODO: move this to zend_cfg.c ? */ + /* TODO: move this to zend_cfg.c ? */ if (!op_array->function_name) { ssa->cfg.flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; } diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 561ee19fc21..6ff14e79b2e 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -491,7 +491,7 @@ static zend_ssa *zend_jit_trace_build_ssa(const zend_op_array *op_array, zend_sc jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); - jit_extension->func_info.num = 0; + jit_extension->func_info.num = 0; jit_extension->func_info.flags &= ZEND_FUNC_JIT_ON_FIRST_EXEC | ZEND_FUNC_JIT_ON_PROF_REQUEST | ZEND_FUNC_JIT_ON_HOT_COUNTERS diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 15bbb363e20..94e5e1fc4e3 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -771,7 +771,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, opline = EX(opline); #endif - op_array = &EX(func)->op_array; + op_array = &EX(func)->op_array; jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); if (UNEXPECTED(!jit_extension) diff --git a/ext/opcache/shared_alloc_mmap.c b/ext/opcache/shared_alloc_mmap.c index 39b6b6f6861..a539d1618c0 100644 --- a/ext/opcache/shared_alloc_mmap.c +++ b/ext/opcache/shared_alloc_mmap.c @@ -53,7 +53,7 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_ fd = VM_MAKE_TAG(251U); #endif #ifdef PROT_MAX - flags |= PROT_MAX(PROT_READ | PROT_WRITE | PROT_EXEC); + flags |= PROT_MAX(PROT_READ | PROT_WRITE | PROT_EXEC); #endif #ifdef MAP_HUGETLB size_t huge_page_size = 2 * 1024 * 1024; diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index f7ba4effb35..b420c14a094 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -54,14 +54,14 @@ static void zend_win_error_message(int type, char *msg, int err) ev_msgs[0] = msg; ev_msgs[1] = buf; ReportEvent(h, // event log handle - EVENTLOG_ERROR_TYPE, // event type - 0, // category zero - err, // event identifier - NULL, // no user security identifier - 2, // one substitution string - 0, // no data - ev_msgs, // pointer to string array - NULL); // pointer to data + EVENTLOG_ERROR_TYPE, // event type + 0, // category zero + err, // event identifier + NULL, // no user security identifier + 2, // one substitution string + 0, // no data + ev_msgs, // pointer to string array + NULL); // pointer to data DeregisterEventSource(h); zend_accel_error(type, "%s", msg); diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index 3110c906d3e..676ed32ce8f 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -191,9 +191,9 @@ zend_accel_hash_entry* zend_accel_hash_find_entry(zend_accel_hash *accel_hash, z int zend_accel_hash_unlink(zend_accel_hash *accel_hash, zend_string *key) { - zend_ulong hash_value; - zend_ulong index; - zend_accel_hash_entry *entry, *last_entry=NULL; + zend_ulong hash_value; + zend_ulong index; + zend_accel_hash_entry *entry, *last_entry=NULL; hash_value = zend_string_hash_val(key); #ifndef ZEND_WIN32 diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index f3276346df3..a9c262b8a33 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -56,7 +56,7 @@ zend_string_hash_val(str); \ zend_set_str_gc_flags(str); \ } \ - } while (0) + } while (0) #define zend_accel_memdup_string(str) do { \ zend_string *new_str = zend_shared_alloc_get_xlat_entry(str); \ if (new_str) { \ @@ -67,7 +67,7 @@ zend_string_hash_val(str); \ zend_set_str_gc_flags(str); \ } \ - } while (0) + } while (0) #define zend_accel_store_interned_string(str) do { \ if (!IS_ACCEL_INTERNED(str)) { \ zend_accel_store_string(str); \ @@ -522,12 +522,12 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc orig_literals = op_array->literals; #if ZEND_USE_ABS_CONST_ADDR - p = zend_shared_memdup_put_free(op_array->literals, sizeof(zval) * op_array->last_literal); + p = zend_shared_memdup_put_free(op_array->literals, sizeof(zval) * op_array->last_literal); #else - p = zend_shared_memdup_put(op_array->literals, sizeof(zval) * op_array->last_literal); + p = zend_shared_memdup_put(op_array->literals, sizeof(zval) * op_array->last_literal); #endif - end = p + op_array->last_literal; - op_array->literals = p; + end = p + op_array->last_literal; + op_array->literals = p; while (p < end) { zend_persist_zval(p); p++; @@ -1131,7 +1131,7 @@ void zend_update_parent_ce(zend_class_entry *ce) ce->iterator_funcs_ptr->zf_key = zend_hash_str_find_ptr(&ce->function_table, "key", sizeof("key") - 1); ce->iterator_funcs_ptr->zf_current = zend_hash_str_find_ptr(&ce->function_table, "current", sizeof("current") - 1); ce->iterator_funcs_ptr->zf_next = zend_hash_str_find_ptr(&ce->function_table, "next", sizeof("next") - 1); - } + } } } @@ -1243,13 +1243,13 @@ static void zend_accel_persist_class_table(HashTable *class_table) JIT_G(on) = 0; #endif - zend_hash_persist(class_table); + zend_hash_persist(class_table); ZEND_HASH_FOREACH_BUCKET(class_table, p) { ZEND_ASSERT(p->key != NULL); zend_accel_store_interned_string(p->key); Z_CE(p->val) = zend_persist_class_entry(Z_CE(p->val)); } ZEND_HASH_FOREACH_END(); - ZEND_HASH_FOREACH_BUCKET(class_table, p) { + ZEND_HASH_FOREACH_BUCKET(class_table, p) { if (EXPECTED(Z_TYPE(p->val) != IS_ALIAS_PTR)) { ce = Z_PTR(p->val); zend_update_parent_ce(ce); diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index 566a59c9204..3f79290841a 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -193,7 +193,7 @@ static void zend_persist_op_array_calc_ex(zend_op_array *op_array) && !zend_shared_alloc_get_xlat_entry(&op_array->function_name)) { zend_shared_alloc_register_xlat_entry(&op_array->function_name, old_name); } - } + } if (op_array->scope) { if (zend_shared_alloc_get_xlat_entry(op_array->opcodes)) { diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index 052698da66d..53c7b61ff3f 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -78,7 +78,7 @@ void zend_shared_alloc_create_lock(char *lockfile_path) int val; #ifdef ZTS - zts_lock = tsrm_mutex_alloc(); + zts_lock = tsrm_mutex_alloc(); #endif snprintf(lockfile_name, sizeof(lockfile_name), "%s/%sXXXXXX", lockfile_path, SEM_FILENAME_PREFIX); diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 973cc2ea4d2..31c52e0fef8 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -130,28 +130,28 @@ static void pcre_handle_exec_error(int pcre_code) /* {{{ */ static const char *php_pcre_get_error_msg(php_pcre_error_code error_code) /* {{{ */ { - switch (error_code) { - case PHP_PCRE_NO_ERROR: - return "No error"; - case PHP_PCRE_INTERNAL_ERROR: - return "Internal error"; - case PHP_PCRE_BAD_UTF8_ERROR: - return "Malformed UTF-8 characters, possibly incorrectly encoded"; - case PHP_PCRE_BAD_UTF8_OFFSET_ERROR: - return "The offset did not correspond to the beginning of a valid UTF-8 code point"; - case PHP_PCRE_BACKTRACK_LIMIT_ERROR: - return "Backtrack limit exhausted"; - case PHP_PCRE_RECURSION_LIMIT_ERROR: - return "Recursion limit exhausted"; + switch (error_code) { + case PHP_PCRE_NO_ERROR: + return "No error"; + case PHP_PCRE_INTERNAL_ERROR: + return "Internal error"; + case PHP_PCRE_BAD_UTF8_ERROR: + return "Malformed UTF-8 characters, possibly incorrectly encoded"; + case PHP_PCRE_BAD_UTF8_OFFSET_ERROR: + return "The offset did not correspond to the beginning of a valid UTF-8 code point"; + case PHP_PCRE_BACKTRACK_LIMIT_ERROR: + return "Backtrack limit exhausted"; + case PHP_PCRE_RECURSION_LIMIT_ERROR: + return "Recursion limit exhausted"; #ifdef HAVE_PCRE_JIT_SUPPORT - case PHP_PCRE_JIT_STACKLIMIT_ERROR: - return "JIT stack limit exhausted"; + case PHP_PCRE_JIT_STACKLIMIT_ERROR: + return "JIT stack limit exhausted"; #endif - default: - return "Unknown error"; - } + default: + return "Unknown error"; + } } /* }}} */ @@ -736,8 +736,8 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in case 'U': coptions |= PCRE2_UNGREEDY; break; case 'u': coptions |= PCRE2_UTF; /* In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII - characters, even in UTF-8 mode. However, this can be changed by setting - the PCRE2_UCP option. */ + characters, even in UTF-8 mode. However, this can be changed by setting + the PCRE2_UCP option. */ #ifdef PCRE2_UCP coptions |= PCRE2_UCP; #endif @@ -2982,9 +2982,9 @@ PHP_FUNCTION(preg_last_error) /* {{{ Returns the error message of the last regexp execution. */ PHP_FUNCTION(preg_last_error_msg) { - ZEND_PARSE_PARAMETERS_NONE(); + ZEND_PARSE_PARAMETERS_NONE(); - RETURN_STRING(php_pcre_get_error_msg(PCRE_G(error_code))); + RETURN_STRING(php_pcre_get_error_msg(PCRE_G(error_code))); } /* }}} */ @@ -2992,7 +2992,7 @@ PHP_FUNCTION(preg_last_error_msg) zend_module_entry pcre_module_entry = { STANDARD_MODULE_HEADER, - "pcre", + "pcre", ext_functions, PHP_MINIT(pcre), PHP_MSHUTDOWN(pcre), diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 8688ada4f9b..09083ccfc30 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -464,7 +464,7 @@ static bool pdo_mysql_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) } if (lval < 0) { /* TODO: Johannes, can we throw a warning here? */ - ((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size = 1024*1024; + ((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size = 1024*1024; PDO_DBG_INF_FMT("Adjusting invalid buffer size to =%l", ((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size); } else { ((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size = lval; diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 845fe288d22..765e05e1358 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -717,48 +717,48 @@ static char *type_to_name_native(int type) /* {{{ */ { #define PDO_MYSQL_NATIVE_TYPE_NAME(x) case FIELD_TYPE_##x: return #x; - switch (type) { - PDO_MYSQL_NATIVE_TYPE_NAME(STRING) - PDO_MYSQL_NATIVE_TYPE_NAME(VAR_STRING) + switch (type) { + PDO_MYSQL_NATIVE_TYPE_NAME(STRING) + PDO_MYSQL_NATIVE_TYPE_NAME(VAR_STRING) #ifdef FIELD_TYPE_TINY - PDO_MYSQL_NATIVE_TYPE_NAME(TINY) + PDO_MYSQL_NATIVE_TYPE_NAME(TINY) #endif #ifdef FIELD_TYPE_BIT - PDO_MYSQL_NATIVE_TYPE_NAME(BIT) + PDO_MYSQL_NATIVE_TYPE_NAME(BIT) #endif - PDO_MYSQL_NATIVE_TYPE_NAME(SHORT) - PDO_MYSQL_NATIVE_TYPE_NAME(LONG) - PDO_MYSQL_NATIVE_TYPE_NAME(LONGLONG) - PDO_MYSQL_NATIVE_TYPE_NAME(INT24) - PDO_MYSQL_NATIVE_TYPE_NAME(FLOAT) - PDO_MYSQL_NATIVE_TYPE_NAME(DOUBLE) - PDO_MYSQL_NATIVE_TYPE_NAME(DECIMAL) + PDO_MYSQL_NATIVE_TYPE_NAME(SHORT) + PDO_MYSQL_NATIVE_TYPE_NAME(LONG) + PDO_MYSQL_NATIVE_TYPE_NAME(LONGLONG) + PDO_MYSQL_NATIVE_TYPE_NAME(INT24) + PDO_MYSQL_NATIVE_TYPE_NAME(FLOAT) + PDO_MYSQL_NATIVE_TYPE_NAME(DOUBLE) + PDO_MYSQL_NATIVE_TYPE_NAME(DECIMAL) #ifdef FIELD_TYPE_NEWDECIMAL - PDO_MYSQL_NATIVE_TYPE_NAME(NEWDECIMAL) + PDO_MYSQL_NATIVE_TYPE_NAME(NEWDECIMAL) #endif #ifdef FIELD_TYPE_GEOMETRY - PDO_MYSQL_NATIVE_TYPE_NAME(GEOMETRY) + PDO_MYSQL_NATIVE_TYPE_NAME(GEOMETRY) #endif - PDO_MYSQL_NATIVE_TYPE_NAME(TIMESTAMP) + PDO_MYSQL_NATIVE_TYPE_NAME(TIMESTAMP) #ifdef FIELD_TYPE_YEAR - PDO_MYSQL_NATIVE_TYPE_NAME(YEAR) + PDO_MYSQL_NATIVE_TYPE_NAME(YEAR) #endif - PDO_MYSQL_NATIVE_TYPE_NAME(SET) - PDO_MYSQL_NATIVE_TYPE_NAME(ENUM) - PDO_MYSQL_NATIVE_TYPE_NAME(DATE) + PDO_MYSQL_NATIVE_TYPE_NAME(SET) + PDO_MYSQL_NATIVE_TYPE_NAME(ENUM) + PDO_MYSQL_NATIVE_TYPE_NAME(DATE) #ifdef FIELD_TYPE_NEWDATE - PDO_MYSQL_NATIVE_TYPE_NAME(NEWDATE) + PDO_MYSQL_NATIVE_TYPE_NAME(NEWDATE) #endif - PDO_MYSQL_NATIVE_TYPE_NAME(TIME) - PDO_MYSQL_NATIVE_TYPE_NAME(DATETIME) - PDO_MYSQL_NATIVE_TYPE_NAME(TINY_BLOB) - PDO_MYSQL_NATIVE_TYPE_NAME(MEDIUM_BLOB) - PDO_MYSQL_NATIVE_TYPE_NAME(LONG_BLOB) - PDO_MYSQL_NATIVE_TYPE_NAME(BLOB) - PDO_MYSQL_NATIVE_TYPE_NAME(NULL) - default: - return NULL; - } + PDO_MYSQL_NATIVE_TYPE_NAME(TIME) + PDO_MYSQL_NATIVE_TYPE_NAME(DATETIME) + PDO_MYSQL_NATIVE_TYPE_NAME(TINY_BLOB) + PDO_MYSQL_NATIVE_TYPE_NAME(MEDIUM_BLOB) + PDO_MYSQL_NATIVE_TYPE_NAME(LONG_BLOB) + PDO_MYSQL_NATIVE_TYPE_NAME(BLOB) + PDO_MYSQL_NATIVE_TYPE_NAME(NULL) + default: + return NULL; + } #undef PDO_MYSQL_NATIVE_TYPE_NAME } /* }}} */ diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index 9bf8925c6a2..f74c67ff4ed 100644 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -381,7 +381,7 @@ static zend_string* oci_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquote *c++ = '\''; /* add second quote */ } - /* Copy remainder and add enclosing quote */ + /* Copy remainder and add enclosing quote */ strncpy(c, l, quotedlen-(c-quoted)-1); quoted[quotedlen-1] = '\''; quoted[quotedlen] = '\0'; @@ -851,11 +851,11 @@ static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ * } /* Get max character width */ - H->last_err = OCINlsNumericInfoGet(H->env, H->err, &H->max_char_width, OCI_NLS_CHARSET_MAXBYTESZ); - if (H->last_err) { - oci_drv_error("OCINlsNumericInfoGet: OCI_NLS_CHARSET_MAXBYTESZ"); - goto cleanup; - } + H->last_err = OCINlsNumericInfoGet(H->env, H->err, &H->max_char_width, OCI_NLS_CHARSET_MAXBYTESZ); + if (H->last_err) { + oci_drv_error("OCINlsNumericInfoGet: OCI_NLS_CHARSET_MAXBYTESZ"); + goto cleanup; + } dbh->methods = &oci_methods; dbh->alloc_own_columns = 1; diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index 54d3629372c..e77c78eef2d 100644 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -201,7 +201,7 @@ static sb4 oci_bind_input_cb(dvoid *ctx, OCIBind *bindp, ub4 iter, ub4 index, dv *indpp = &P->indicator; - if (Z_ISREF(param->parameter)) + if (Z_ISREF(param->parameter)) parameter = Z_REFVAL(param->parameter); else parameter = ¶m->parameter; diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index 23334c32651..4f59913937a 100644 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -196,14 +196,14 @@ static bool odbc_handle_preparer(pdo_dbh_t *dbh, zend_string *sql, pdo_stmt_t *s if (rc != SQL_SUCCESS) { pdo_odbc_stmt_error("SQLPrepare"); - if (rc != SQL_SUCCESS_WITH_INFO) { - /* clone error information into the db handle */ - strcpy(H->einfo.last_err_msg, S->einfo.last_err_msg); - H->einfo.file = S->einfo.file; - H->einfo.line = S->einfo.line; - H->einfo.what = S->einfo.what; - strcpy(dbh->error_code, stmt->error_code); - } + if (rc != SQL_SUCCESS_WITH_INFO) { + /* clone error information into the db handle */ + strcpy(H->einfo.last_err_msg, S->einfo.last_err_msg); + H->einfo.file = S->einfo.file; + H->einfo.line = S->einfo.line; + H->einfo.what = S->einfo.what; + strcpy(dbh->error_code, stmt->error_code); + } } if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index 8db2cd63f3a..d059e62a277 100644 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -615,7 +615,7 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno) rc = SQLBindCol(S->stmt, colno+1, S->cols[colno].is_unicode ? SQL_C_BINARY : SQL_C_CHAR, S->cols[colno].data, - S->cols[colno].datalen+1, &S->cols[colno].fetched_len); + S->cols[colno].datalen+1, &S->cols[colno].fetched_len); if (rc != SQL_SUCCESS) { pdo_odbc_stmt_error("SQLBindCol"); diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 806ba55840f..3d2818f5868 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -724,8 +724,8 @@ PHP_METHOD(PDO_PGSql_Ext, pgsqlCopyFromFile) PQclear(pgsql_result); while ((buf = php_stream_get_line(stream, NULL, 0, &line_len)) != NULL) { if (PQputCopyData(H->server, buf, line_len) != 1) { - efree(buf); - pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, NULL); + efree(buf); + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, NULL); php_stream_close(stream); PDO_HANDLE_DBH_ERR(); RETURN_FALSE; diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 087d0ea83e1..a992b331631 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2613,10 +2613,10 @@ PHP_FUNCTION(pg_lo_read) /* {{{ Write a large object */ PHP_FUNCTION(pg_lo_write) { - zval *pgsql_id; - zend_string *str; - zend_long z_len; - bool z_len_is_null = 1; + zval *pgsql_id; + zend_string *str; + zend_long z_len; + bool z_len_is_null = 1; size_t nbytes; size_t len; pgLofp *pgsql; @@ -2654,7 +2654,7 @@ PHP_FUNCTION(pg_lo_write) /* {{{ Read a large object and send straight to browser */ PHP_FUNCTION(pg_lo_read_all) { - zval *pgsql_id; + zval *pgsql_id; int tbytes; volatile int nbytes; char buf[PGSQL_LO_READ_BUF_SIZE]; @@ -5815,7 +5815,7 @@ PHP_PGSQL_API void php_pgsql_result2array(PGresult *pg_result, zval *ret_array, /* }}} */ /* {{{ php_pgsql_select */ - PHP_PGSQL_API zend_result php_pgsql_select(PGconn *pg_link, const zend_string *table, zval *ids_array, zval *ret_array, zend_ulong opt, long result_type, zend_string **sql) +PHP_PGSQL_API zend_result php_pgsql_select(PGconn *pg_link, const zend_string *table, zval *ids_array, zval *ret_array, zend_ulong opt, long result_type, zend_string **sql) { zval ids_converted; smart_str querystr = {0}; diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index cf5e47b994a..9656480487e 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -569,17 +569,17 @@ PHP_METHOD(Phar, webPhar) /* retrieve requested file within phar */ if (!(SG(request_info).request_method - && SG(request_info).request_uri - && (!strcmp(SG(request_info).request_method, "GET") - || !strcmp(SG(request_info).request_method, "POST") - || !strcmp(SG(request_info).request_method, "DELETE") - || !strcmp(SG(request_info).request_method, "HEAD") - || !strcmp(SG(request_info).request_method, "OPTIONS") - || !strcmp(SG(request_info).request_method, "PATCH") - || !strcmp(SG(request_info).request_method, "PUT") - ) - ) - ) { + && SG(request_info).request_uri + && (!strcmp(SG(request_info).request_method, "GET") + || !strcmp(SG(request_info).request_method, "POST") + || !strcmp(SG(request_info).request_method, "DELETE") + || !strcmp(SG(request_info).request_method, "HEAD") + || !strcmp(SG(request_info).request_method, "OPTIONS") + || !strcmp(SG(request_info).request_method, "PATCH") + || !strcmp(SG(request_info).request_method, "PUT") + ) + ) + ) { return; } diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 7a87f16bb59..e56d3e8e321 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -202,8 +202,8 @@ static int phar_tar_process_metadata(phar_entry_info *entry, php_stream *fp) /* #ifndef HAVE_STRNLEN static size_t strnlen(const char *s, size_t maxlen) { - char *r = (char *)memchr(s, '\0', maxlen); - return r ? r-s : maxlen; + char *r = (char *)memchr(s, '\0', maxlen); + return r ? r-s : maxlen; } #endif diff --git a/ext/posix/posix.c b/ext/posix/posix.c index f91912e57e8..e6655f0d95b 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -206,7 +206,7 @@ PHP_FUNCTION(posix_kill) if (kill(pid, sig) < 0) { POSIX_G(last_error) = errno; RETURN_FALSE; - } + } RETURN_TRUE; } diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index eabd2619aba..6cb327635be 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -55,7 +55,7 @@ static zend_class_entry *php_pspell_config_ce = NULL; static zend_object_handlers php_pspell_config_handlers; zend_module_entry pspell_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER, "pspell", ext_functions, PHP_MINIT(pspell), @@ -615,7 +615,7 @@ PHP_FUNCTION(pspell_config_create) pspell_config_replace(config, "language-tag", language); - if (spelling_len) { + if (spelling_len) { pspell_config_replace(config, "spelling", spelling); } diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 7331b437984..544258eeca6 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -82,7 +82,7 @@ PHP_MINIT_FUNCTION(readline) #if HAVE_RL_CALLBACK_READ_CHAR ZVAL_UNDEF(&_prepped_callback); #endif - return PHP_MINIT(cli_readline)(INIT_FUNC_ARGS_PASSTHRU); + return PHP_MINIT(cli_readline)(INIT_FUNC_ARGS_PASSTHRU); } PHP_MSHUTDOWN_FUNCTION(readline) @@ -323,7 +323,7 @@ PHP_FUNCTION(readline_list_history) } #elif defined(HAVE_LIBEDIT) /* libedit */ - { + { HISTORY_STATE *hs; int i; @@ -338,7 +338,7 @@ PHP_FUNCTION(readline_list_history) } } free(hs); - } + } #else /* readline */ history = history_list(); diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index ec7d1565be1..b44b4136ca3 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3048,10 +3048,10 @@ ZEND_METHOD(ReflectionUnionType, getTypes) zend_string *name = ZEND_TYPE_NAME(param->type); if (ZSTR_HAS_CE_CACHE(name) && ZSTR_GET_CE_CACHE(name)) { - append_type(return_value, + append_type(return_value, (zend_type) ZEND_TYPE_INIT_CE(ZSTR_GET_CE_CACHE(name), 0, 0)); - } else { - append_type(return_value, + } else { + append_type(return_value, (zend_type) ZEND_TYPE_INIT_CLASS(name, 0, 0)); } } else if (ZEND_TYPE_HAS_CE(param->type)) { @@ -6133,9 +6133,9 @@ ZEND_METHOD(ReflectionExtension, info) ZEND_METHOD(ReflectionExtension, isPersistent) { reflection_object *intern; - zend_module_entry *module; + zend_module_entry *module; - if (zend_parse_parameters_none() == FAILURE) { + if (zend_parse_parameters_none() == FAILURE) { RETURN_THROWS(); } GET_REFLECTION_OBJECT_PTR(module); diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index d1949e342c4..214275dbac4 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -57,7 +57,7 @@ static void ps_call_handler(zval *func, int argc, zval *argv, zval *retval) ret = SUCCESS; \ } else if (Z_TYPE(retval) == IS_FALSE) { \ ret = FAILURE; \ - } else if ((Z_TYPE(retval) == IS_LONG) && (Z_LVAL(retval) == -1)) { \ + } else if ((Z_TYPE(retval) == IS_LONG) && (Z_LVAL(retval) == -1)) { \ if (!EG(exception)) { \ php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_type_name(&retval)); \ } \ diff --git a/ext/session/session.c b/ext/session/session.c index c684a78f518..c096e809c17 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1367,9 +1367,9 @@ static int php_session_send_cookie(void) /* {{{ */ } if (PS(cookie_samesite)[0]) { - smart_str_appends(&ncookie, COOKIE_SAMESITE); - smart_str_appends(&ncookie, PS(cookie_samesite)); - } + smart_str_appends(&ncookie, COOKIE_SAMESITE); + smart_str_appends(&ncookie, PS(cookie_samesite)); + } smart_str_0(&ncookie); @@ -2327,7 +2327,7 @@ PHP_FUNCTION(session_create_id) /* Detect collision and retry */ if (PS(mod)->s_validate_sid(&PS(mod_data), new_id) == SUCCESS) { zend_string_release_ex(new_id, 0); - new_id = NULL; + new_id = NULL; continue; } break; diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 0e60b385bcb..8052dc77952 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -66,7 +66,7 @@ typedef struct php_shmop int shmatflg; char *addr; zend_long size; - zend_object std; + zend_object std; } php_shmop; zend_class_entry *shmop_ce; diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 2df602f0fca..5dfc69689d1 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1294,7 +1294,7 @@ PHP_METHOD(SimpleXMLElement, xpath) } sxe->xpath->node = nodeptr; - ns = xmlGetNsList((xmlDocPtr) sxe->document->ptr, nodeptr); + ns = xmlGetNsList((xmlDocPtr) sxe->document->ptr, nodeptr); if (ns != NULL) { while (ns[nsnbr] != NULL) { nsnbr++; diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 0017c225128..feb8e583c13 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2046,7 +2046,7 @@ static int calc_dimension(const char* str) int i = 1; while (*str != ']' && *str != '\0') { if (*str == ',') { - i++; + i++; } str++; } @@ -2097,26 +2097,26 @@ static void add_xml_array_elements(xmlNodePtr xmlParam, break; } ZVAL_DEREF(zdata); - if (dimension == 1) { - if (enc == NULL) { + if (dimension == 1) { + if (enc == NULL) { xparam = master_to_xml(get_conversion(Z_TYPE_P(zdata)), zdata, style, xmlParam); } else { xparam = master_to_xml(enc, zdata, style, xmlParam); } if (type) { - xmlNodeSetName(xparam, BAD_CAST(type->name)); - } else if (style == SOAP_LITERAL && enc && enc->details.type_str) { + xmlNodeSetName(xparam, BAD_CAST(type->name)); + } else if (style == SOAP_LITERAL && enc && enc->details.type_str) { xmlNodeSetName(xparam, BAD_CAST(enc->details.type_str)); xmlSetNs(xparam, ns); } else { - xmlNodeSetName(xparam, BAD_CAST("item")); - } - } else { - add_xml_array_elements(xmlParam, type, enc, ns, dimension-1, dims+1, zdata, style); - } - j++; - } ZEND_HASH_FOREACH_END(); + xmlNodeSetName(xparam, BAD_CAST("item")); + } + } else { + add_xml_array_elements(xmlParam, type, enc, ns, dimension-1, dims+1, zdata, style); + } + j++; + } ZEND_HASH_FOREACH_END(); if (dimension == 1) { while (j < dims[0]) { @@ -2124,42 +2124,42 @@ static void add_xml_array_elements(xmlNodePtr xmlParam, xmlAddChild(xmlParam, xparam); if (type) { - xmlNodeSetName(xparam, BAD_CAST(type->name)); - } else if (style == SOAP_LITERAL && enc && enc->details.type_str) { + xmlNodeSetName(xparam, BAD_CAST(type->name)); + } else if (style == SOAP_LITERAL && enc && enc->details.type_str) { xmlNodeSetName(xparam, BAD_CAST(enc->details.type_str)); xmlSetNs(xparam, ns); } else { - xmlNodeSetName(xparam, BAD_CAST("item")); - } + xmlNodeSetName(xparam, BAD_CAST("item")); + } - j++; - } + j++; + } } else { while (j < dims[0]) { add_xml_array_elements(xmlParam, type, enc, ns, dimension-1, dims+1, NULL, style); - j++; - } + j++; + } } - } else { + } else { for (j=0; jname)); - } else if (style == SOAP_LITERAL && enc && enc->details.type_str) { + xmlNodeSetName(xparam, BAD_CAST(type->name)); + } else if (style == SOAP_LITERAL && enc && enc->details.type_str) { xmlNodeSetName(xparam, BAD_CAST(enc->details.type_str)); xmlSetNs(xparam, ns); } else { - xmlNodeSetName(xparam, BAD_CAST("item")); - } - } else { - add_xml_array_elements(xmlParam, type, enc, ns, dimension-1, dims+1, NULL, style); - } + xmlNodeSetName(xparam, BAD_CAST("item")); + } + } else { + add_xml_array_elements(xmlParam, type, enc, ns, dimension-1, dims+1, NULL, style); + } } - } + } } static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNodePtr parent) diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 3c78a78c269..a2852c80b71 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -264,9 +264,9 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph php_stream_close(stream); stream = NULL; } - smart_str_free(&soap_headers); + smart_str_free(&soap_headers); - if (stream) { + if (stream) { zend_string *http_headers = get_http_headers(stream); if (http_headers) { zend_string_free(http_headers); @@ -278,7 +278,7 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph /* enable SSL transport layer */ if (stream) { /* if a stream is created without encryption, check to see if SSL method parameter is specified and use - proper encrypyion method based on constants defined in soap.c */ + proper encrypyion method based on constants defined in soap.c */ int crypto_method = STREAM_CRYPTO_METHOD_SSLv23_CLIENT; if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_ssl_method", sizeof("_ssl_method")-1)) != NULL && Z_TYPE_P(tmp) == IS_LONG) { @@ -318,17 +318,17 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph static int in_domain(const char *host, const char *domain) { - if (domain[0] == '.') { - int l1 = strlen(host); - int l2 = strlen(domain); - if (l1 > l2) { - return strcmp(host+l1-l2,domain) == 0; - } else { - return 0; - } - } else { - return strcmp(host,domain) == 0; - } + if (domain[0] == '.') { + int l1 = strlen(host); + int l2 = strlen(domain); + if (l1 > l2) { + return strcmp(host+l1-l2,domain) == 0; + } else { + return 0; + } + } else { + return strcmp(host,domain) == 0; + } } int make_http_soap_request(zval *this_ptr, @@ -493,14 +493,14 @@ try_again: (!use_ssl && !zend_string_equals_literal(orig->scheme, "https"))) && zend_string_equals(orig->host, phpurl->host) && orig->port == phpurl->port))) { - } else { + } else { php_stream_close(stream); zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpurl", sizeof("httpurl")-1); zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket")-1); zend_hash_str_del(Z_OBJPROP_P(this_ptr), "_use_proxy", sizeof("_use_proxy")-1); stream = NULL; use_proxy = 0; - } + } } /* Check if keep-alive connection is still opened */ @@ -1480,7 +1480,7 @@ static zend_string* get_http_body(php_stream *stream, int close, char *headers) } len_size += len_read; http_buf_size += len_read; - } + } /* Eat up '\r' '\n' */ ch = php_stream_getc(stream); @@ -1494,7 +1494,7 @@ static zend_string* get_http_body(php_stream *stream, int close, char *headers) } return NULL; } - } + } } else { /* Something wrong in chunked encoding */ if (http_buf) { diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c index e7e59d9f8cf..e93679a55ea 100644 --- a/ext/soap/php_schema.c +++ b/ext/soap/php_schema.c @@ -1886,8 +1886,8 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl attr = attr->next; } if (newAttr->form == XSD_FORM_DEFAULT) { - xmlNodePtr parent = attrType->parent; - while (parent) { + xmlNodePtr parent = attrType->parent; + while (parent) { if (node_is_equal_ex(parent, "schema", SCHEMA_NAMESPACE)) { xmlAttrPtr def; def = get_attribute(parent->properties, "attributeFormDefault"); @@ -1899,7 +1899,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl break; } parent = parent->parent; - } + } if (parent == NULL) { newAttr->form = XSD_FORM_UNQUALIFIED; } diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 698c9f97408..c907bec3d1d 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -3283,7 +3283,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl) /* Use HTTP/1.1 with "Connection: close" by default */ if ((tmp = php_stream_context_get_option(context, "http", "protocol_version")) == NULL) { - zval http_version; + zval http_version; ZVAL_DOUBLE(&http_version, 1.1); php_stream_context_set_option(context, "http", "protocol_version", &http_version); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index ef8b721e93b..29fba2613af 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2036,10 +2036,10 @@ PHP_METHOD(SoapClient, __construct) } if ((tmp = zend_hash_str_find(ht, "local_cert", sizeof("local_cert")-1)) != NULL && Z_TYPE_P(tmp) == IS_STRING) { - if (!context) { - context = php_stream_context_alloc(); - } - php_stream_context_set_option(context, "ssl", "local_cert", tmp); + if (!context) { + context = php_stream_context_alloc(); + } + php_stream_context_set_option(context, "ssl", "local_cert", tmp); if ((tmp = zend_hash_str_find(ht, "passphrase", sizeof("passphrase")-1)) != NULL && Z_TYPE_P(tmp) == IS_STRING) { php_stream_context_set_option(context, "ssl", "passphrase", tmp); @@ -2092,7 +2092,7 @@ PHP_METHOD(SoapClient, __construct) if ((tmp = zend_hash_str_find(ht, "features", sizeof("features")-1)) != NULL && Z_TYPE_P(tmp) == IS_LONG) { add_property_long(this_ptr, "_features", Z_LVAL_P(tmp)); - } + } if ((tmp = zend_hash_str_find(ht, "connection_timeout", sizeof("connection_timeout")-1)) != NULL) { if (Z_TYPE_P(tmp) != IS_LONG) { @@ -2255,9 +2255,9 @@ static void do_soap_call(zend_execute_data *execute_data, { zval *tmp; zval *trace; - sdlPtr sdl = NULL; - sdlPtr old_sdl = NULL; - sdlFunctionPtr fn; + sdlPtr sdl = NULL; + sdlPtr old_sdl = NULL; + sdlFunctionPtr fn; xmlDocPtr request = NULL; int ret = FALSE; int soap_version; @@ -2297,7 +2297,7 @@ static void do_soap_call(zend_execute_data *execute_data, FETCH_TYPEMAP_RES(typemap,tmp); } - clear_soap_fault(this_ptr); + clear_soap_fault(this_ptr); SOAP_GLOBAL(soap_version) = soap_version; old_sdl = SOAP_GLOBAL(sdl); @@ -2328,8 +2328,8 @@ static void do_soap_call(zend_execute_data *execute_data, zend_try { if (sdl != NULL) { - fn = get_function(sdl, function); - if (fn != NULL) { + fn = get_function(sdl, function); + if (fn != NULL) { sdlBindingPtr binding = fn->binding; bool one_way = 0; @@ -2345,12 +2345,12 @@ static void do_soap_call(zend_execute_data *execute_data, } if (binding->bindingType == BINDING_SOAP) { sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes; - request = serialize_function_call(this_ptr, fn, NULL, fnb->input.ns, real_args, arg_count, soap_version, soap_headers); + request = serialize_function_call(this_ptr, fn, NULL, fnb->input.ns, real_args, arg_count, soap_version, soap_headers); ret = do_request(this_ptr, request, location, fnb->soapAction, soap_version, one_way, &response); - } else { + } else { request = serialize_function_call(this_ptr, fn, NULL, sdl->target_ns, real_args, arg_count, soap_version, soap_headers); ret = do_request(this_ptr, request, location, NULL, soap_version, one_way, &response); - } + } xmlFreeDoc(request); request = NULL; diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index 4eaa217b738..ba5b1d8a5ad 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -226,9 +226,9 @@ static unsigned from_array_iterate(const zval *arr, break; } i++; - } ZEND_HASH_FOREACH_END(); + } ZEND_HASH_FOREACH_END(); - return i -1; + return i -1; } /* Generic Aggregated conversions */ @@ -951,8 +951,8 @@ static void from_zval_write_control_array(const zval *arr, char *msghdr_c, ser_c zend_llist_remove_tail(&ctx->keys); } ZEND_HASH_FOREACH_END(); - msg->msg_control = control_buf; - msg->msg_controllen = cur_offset; /* not control_len, which may be larger */ + msg->msg_control = control_buf; + msg->msg_controllen = cur_offset; /* not control_len, which may be larger */ } static void to_zval_read_cmsg_data(const char *cmsghdr_c, zval *zv, res_context *ctx) { @@ -1100,7 +1100,7 @@ static void from_zval_write_iov_array(const zval *arr, char *msghdr_c, ser_conte msg->msg_iov = accounted_safe_ecalloc(num_elem, sizeof *msg->msg_iov, 0, ctx); msg->msg_iovlen = (size_t)num_elem; - from_array_iterate(arr, from_zval_write_iov_array_aux, (void**)&msg, ctx); + from_array_iterate(arr, from_zval_write_iov_array_aux, (void**)&msg, ctx); } static void from_zval_write_controllen(const zval *elem, char *msghdr_c, ser_context *ctx) { @@ -1376,7 +1376,7 @@ void from_zval_write_fd_array(const zval *arr, char *int_arr, ser_context *ctx) return; } - from_array_iterate(arr, &from_zval_write_fd_array_aux, (void**)&int_arr, ctx); + from_array_iterate(arr, &from_zval_write_fd_array_aux, (void**)&int_arr, ctx); } void to_zval_read_fd_array(const char *data, zval *zv, res_context *ctx) { diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 36b20a1ead1..b4aeaaba3f4 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2168,11 +2168,11 @@ int socket_import_file_descriptor(PHP_SOCKET socket, php_socket *retsock) int t; #endif - retsock->bsd_socket = socket; + retsock->bsd_socket = socket; - /* determine family */ + /* determine family */ #ifdef SO_DOMAIN - if (getsockopt(socket, SOL_SOCKET, SO_DOMAIN, &type, &type_len) == 0) { + if (getsockopt(socket, SOL_SOCKET, SO_DOMAIN, &type, &type_len) == 0) { retsock->type = type; } else #endif @@ -2183,18 +2183,18 @@ int socket_import_file_descriptor(PHP_SOCKET socket, php_socket *retsock) return 0; } - /* determine blocking mode */ + /* determine blocking mode */ #ifndef PHP_WIN32 - t = fcntl(socket, F_GETFL); - if (t == -1) { + t = fcntl(socket, F_GETFL); + if (t == -1) { PHP_SOCKET_ERROR(retsock, "Unable to obtain blocking state", errno); return 0; - } else { - retsock->blocking = !(t & O_NONBLOCK); - } + } else { + retsock->blocking = !(t & O_NONBLOCK); + } #endif - return 1; + return 1; } /* {{{ Imports a stream that encapsulates a socket into a socket extension resource. */ @@ -2585,7 +2585,7 @@ PHP_FUNCTION(socket_addrinfo_explain) #ifdef PHP_WIN32 - /* {{{ Exports the network socket information suitable to be used in another process and returns the info id. */ +/* {{{ Exports the network socket information suitable to be used in another process and returns the info id. */ PHP_FUNCTION(socket_wsaprotocol_info_export) { WSAPROTOCOL_INFO wi; diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 5aac0a4ddab..c6b7e02a00c 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -58,9 +58,9 @@ static zend_class_entry * spl_find_ce_by_name(zend_string *name, bool autoload) ce = zend_hash_find_ptr(EG(class_table), lc_name); zend_string_release(lc_name); } else { - ce = zend_lookup_class(name); - } - if (ce == NULL) { + ce = zend_lookup_class(name); + } + if (ce == NULL) { php_error_docref(NULL, E_WARNING, "Class %s does not exist%s", ZSTR_VAL(name), autoload ? " and could not be loaded" : ""); return NULL; } diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index a51867760e4..cedd4df12dd 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1155,7 +1155,7 @@ PHP_METHOD(ArrayObject, __construct) spl_array_set_array(object, intern, array, ar_flags, ZEND_NUM_ARGS() == 1); } - /* }}} */ +/* }}} */ /* {{{ Constructs a new array iterator from an array or object. */ PHP_METHOD(ArrayIterator, __construct) @@ -1179,7 +1179,7 @@ PHP_METHOD(ArrayIterator, __construct) spl_array_set_array(object, intern, array, ar_flags, ZEND_NUM_ARGS() == 1); } - /* }}} */ +/* }}} */ /* {{{ Set the class used in getIterator. */ PHP_METHOD(ArrayObject, setIteratorClass) @@ -1702,7 +1702,7 @@ PHP_METHOD(ArrayObject, unserialize) if (*p != ';') { goto outexcept; } - ++p; + ++p; } /* members */ diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 7451de685d0..2e0d8e5fc5e 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -2053,10 +2053,10 @@ PHP_METHOD(SplFileObject, __construct) /* spl_filesystem_file_open() can generate E_WARNINGs which we want to promote to exceptions */ zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling); zend_result retval = spl_filesystem_file_open(intern, use_include_path); - zend_restore_error_handling(&error_handling); - if (retval == FAILURE) { + zend_restore_error_handling(&error_handling); + if (retval == FAILURE) { RETURN_THROWS(); - } + } path_len = strlen(intern->u.file.stream->orig_path); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 7b506b6c4a4..82f55db9800 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1146,7 +1146,7 @@ PHP_METHOD(RecursiveTreeIterator, current) zend_object_iterator *iterator = object->iterators[object->level].iterator; zval *data; - SPL_FETCH_SUB_ITERATOR(iterator, object); + SPL_FETCH_SUB_ITERATOR(iterator, object); data = iterator->funcs->get_current_data(iterator); if (data) { ZVAL_COPY_DEREF(return_value, data); diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 7027defe61c..bd8fc5ec95b 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -186,14 +186,14 @@ PHP_METHOD(SQLite3, close) } if (db_obj->initialised) { - zend_llist_clean(&(db_obj->free_list)); + zend_llist_clean(&(db_obj->free_list)); if(db_obj->db) { - errcode = sqlite3_close(db_obj->db); - if (errcode != SQLITE_OK) { - php_sqlite3_error(db_obj, "Unable to close database: %d, %s", errcode, sqlite3_errmsg(db_obj->db)); - RETURN_FALSE; - } - } + errcode = sqlite3_close(db_obj->db); + if (errcode != SQLITE_OK) { + php_sqlite3_error(db_obj, "Unable to close database: %d, %s", errcode, sqlite3_errmsg(db_obj->db)); + RETURN_FALSE; + } + } db_obj->initialised = 0; } @@ -1416,7 +1416,7 @@ PHP_METHOD(SQLite3Stmt, close) SQLITE3_CHECK_INITIALIZED(stmt_obj->db_obj, stmt_obj->initialised, SQLite3); if(stmt_obj->db_obj) { - zend_llist_del_element(&(stmt_obj->db_obj->free_list), object, (int (*)(void *, void *)) php_sqlite3_compare_stmt_zval_free); + zend_llist_del_element(&(stmt_obj->db_obj->free_list), object, (int (*)(void *, void *)) php_sqlite3_compare_stmt_zval_free); } RETURN_TRUE; diff --git a/ext/standard/array.c b/ext/standard/array.c index d545dc26edd..da934f4e820 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1543,7 +1543,7 @@ static inline void php_search_array(INTERNAL_FUNCTION_PARAMETERS, int behavior) } } } ZEND_HASH_FOREACH_END(); - } + } } RETURN_FALSE; diff --git a/ext/standard/base64.c b/ext/standard/base64.c index b5f25c7bcb8..7a237d09ecc 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -115,7 +115,7 @@ static zend_always_inline unsigned char *neon_base64_encode(const unsigned char inl -= 16 * 3; } while (inl >= 16 * 3); - *left = inl; + *left = inl; return out; } #endif /* __aarch64__ */ @@ -252,7 +252,7 @@ static zend_always_inline int php_base64_decode_impl(const unsigned char *in, si if (inl >= 16 * 4) { size_t left = 0; j += neon_base64_decode(in, inl, out, &left); - i = inl - left; + i = inl - left; in += i; inl = left; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 0dfcdaf33c3..cf59ee2d4e7 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -551,8 +551,8 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */ BASIC_RSHUTDOWN_SUBMODULE(user_filters) BASIC_RSHUTDOWN_SUBMODULE(browscap) - BG(page_uid) = -1; - BG(page_gid) = -1; + BG(page_uid) = -1; + BG(page_gid) = -1; return SUCCESS; } /* }}} */ @@ -773,7 +773,7 @@ PHPAPI zend_string *php_getenv(const char *str, size_t str_len) { } } #else - tsrm_env_lock(); + tsrm_env_lock(); /* system method returns a const */ char *ptr = getenv(str); @@ -782,7 +782,7 @@ PHPAPI zend_string *php_getenv(const char *str, size_t str_len) { result = zend_string_init(ptr, strlen(ptr), 0); } - tsrm_env_unlock(); + tsrm_env_unlock(); return result; #endif } @@ -1061,10 +1061,10 @@ PHP_FUNCTION(getopt) int pos = 0; zval *entry; - if (Z_TYPE_P(args) != IS_ARRAY) { - RETURN_FALSE; - } - argc = zend_hash_num_elements(Z_ARRVAL_P(args)); + if (Z_TYPE_P(args) != IS_ARRAY) { + RETURN_FALSE; + } + argc = zend_hash_num_elements(Z_ARRVAL_P(args)); /* Attempt to allocate enough memory to hold all of the arguments * and a trailing NULL */ diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 419672de9f3..77d296ced77 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -242,7 +242,7 @@ PHPAPI int php_load_extension(const char *filename, int type, int start_now) static void php_dl_error(const char *filename) { - php_error_docref(NULL, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", filename); + php_error_docref(NULL, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", filename); } PHPAPI void *php_load_shlib(const char *path, char **errp) @@ -254,9 +254,9 @@ PHPAPI void *php_load_shlib(const char *path, char **errp) PHPAPI int php_load_extension(const char *filename, int type, int start_now) { - php_dl_error(filename); + php_dl_error(filename); - return FAILURE; + return FAILURE; } #endif @@ -264,12 +264,12 @@ PHPAPI int php_load_extension(const char *filename, int type, int start_now) /* {{{ php_dl */ PHPAPI void php_dl(const char *file, int type, zval *return_value, int start_now) { - /* Load extension */ - if (php_load_extension(file, type, start_now) == FAILURE) { - RETVAL_FALSE; - } else { - RETVAL_TRUE; - } + /* Load extension */ + if (php_load_extension(file, type, start_now) == FAILURE) { + RETVAL_FALSE; + } else { + RETVAL_TRUE; + } } /* }}} */ @@ -280,5 +280,5 @@ PHP_MINFO_FUNCTION(dl) #else #define PHP_DL_SUPPORT_STATUS "unavailable" #endif - php_info_print_table_row(2, "Dynamic Library Support", PHP_DL_SUPPORT_STATUS); + php_info_print_table_row(2, "Dynamic Library Support", PHP_DL_SUPPORT_STATUS); } diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 540c777faab..c4cfbc0d6a0 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -429,8 +429,8 @@ PHP_FUNCTION(dns_check_record) RETURN_FALSE; } #elif defined(HAVE_RES_NSEARCH) - memset(&state, 0, sizeof(state)); - if (res_ninit(handle)) { + memset(&state, 0, sizeof(state)); + if (res_ninit(handle)) { RETURN_FALSE; } #else @@ -481,11 +481,11 @@ static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_t GETLONG(ttl, cp); GETSHORT(dlen, cp); CHECKCP(dlen); - if (dlen == 0) { - /* No data in the response - nothing to do */ - return NULL; - } - if (type_to_fetch != DNS_T_ANY && type != type_to_fetch) { + if (dlen == 0) { + /* No data in the response - nothing to do */ + return NULL; + } + if (type_to_fetch != DNS_T_ANY && type != type_to_fetch) { cp += dlen; return cp; } @@ -1100,8 +1100,8 @@ PHP_FUNCTION(dns_get_mx) RETURN_FALSE; } #elif defined(HAVE_RES_NSEARCH) - memset(&state, 0, sizeof(state)); - if (res_ninit(handle)) { + memset(&state, 0, sizeof(state)); + if (res_ninit(handle)) { RETURN_FALSE; } #else diff --git a/ext/standard/file.c b/ext/standard/file.c index 1afa4c648f1..0137f12dedc 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -2086,11 +2086,11 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int char *tmp = bptr; while ((*tmp != delimiter) && isspace((int)*(unsigned char *)tmp)) { tmp++; - } + } if (*tmp == enclosure) { bptr = tmp; } - } + } if (first_field && bptr == line_end) { add_next_index_null(return_value); diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index 34a790b6b84..a99a52dccf8 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -102,35 +102,35 @@ PHPAPI int php_flock(int fd, int operation) * Lift a leg, Yunie. Luv ya forever!!!! */ { - HANDLE hdl = (HANDLE) _get_osfhandle(fd); - DWORD low = 1, high = 0; - OVERLAPPED offset = - {0, 0, 0, 0, NULL}; + HANDLE hdl = (HANDLE) _get_osfhandle(fd); + DWORD low = 1, high = 0; + OVERLAPPED offset = + {0, 0, 0, 0, NULL}; DWORD err; - if (INVALID_HANDLE_VALUE == hdl) { + if (INVALID_HANDLE_VALUE == hdl) { _set_errno(EBADF); - return -1; /* error in file descriptor */ + return -1; /* error in file descriptor */ + } + /* bug for bug compatible with Unix */ + UnlockFileEx(hdl, 0, low, high, &offset); + switch (operation & ~LOCK_NB) { /* translate to LockFileEx() op */ + case LOCK_EX: /* exclusive */ + if (LockFileEx(hdl, LOCKFILE_EXCLUSIVE_LOCK + + ((operation & LOCK_NB) ? LOCKFILE_FAIL_IMMEDIATELY : 0), + 0, low, high, &offset)) + return 0; + break; + case LOCK_SH: /* shared */ + if (LockFileEx(hdl, ((operation & LOCK_NB) ? LOCKFILE_FAIL_IMMEDIATELY : 0), + 0, low, high, &offset)) + return 0; + break; + case LOCK_UN: /* unlock */ + return 0; /* always succeeds */ + default: /* default */ + break; } - /* bug for bug compatible with Unix */ - UnlockFileEx(hdl, 0, low, high, &offset); - switch (operation & ~LOCK_NB) { /* translate to LockFileEx() op */ - case LOCK_EX: /* exclusive */ - if (LockFileEx(hdl, LOCKFILE_EXCLUSIVE_LOCK + - ((operation & LOCK_NB) ? LOCKFILE_FAIL_IMMEDIATELY : 0), - 0, low, high, &offset)) - return 0; - break; - case LOCK_SH: /* shared */ - if (LockFileEx(hdl, ((operation & LOCK_NB) ? LOCKFILE_FAIL_IMMEDIATELY : 0), - 0, low, high, &offset)) - return 0; - break; - case LOCK_UN: /* unlock */ - return 0; /* always succeeds */ - default: /* default */ - break; - } err = GetLastError(); if (ERROR_LOCK_VIOLATION == err || ERROR_SHARING_VIOLATION == err) { @@ -139,7 +139,7 @@ PHPAPI int php_flock(int fd, int operation) _set_errno(EINVAL); /* bad call */ } - return -1; + return -1; } /* }}} */ #else @@ -161,56 +161,56 @@ PHPAPI int php_flock(int fd, int operation) */ int inet_aton(const char *cp, struct in_addr *ap) { - int dots = 0; - unsigned long acc = 0, addr = 0; + int dots = 0; + unsigned long acc = 0, addr = 0; - do { - char cc = *cp; + do { + char cc = *cp; - switch (cc) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - acc = acc * 10 + (cc - '0'); - break; + switch (cc) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + acc = acc * 10 + (cc - '0'); + break; - case '.': - if (++dots > 3) { - return 0; - } - /* Fall through */ + case '.': + if (++dots > 3) { + return 0; + } + /* Fall through */ - case '\0': - if (acc > 255) { - return 0; - } - addr = addr << 8 | acc; - acc = 0; - break; + case '\0': + if (acc > 255) { + return 0; + } + addr = addr << 8 | acc; + acc = 0; + break; - default: - return 0; - } - } while (*cp++) ; + default: + return 0; + } + } while (*cp++) ; - /* Normalize the address */ - if (dots < 3) { - addr <<= 8 * (3 - dots) ; - } + /* Normalize the address */ + if (dots < 3) { + addr <<= 8 * (3 - dots) ; + } - /* Store it if requested */ - if (ap) { - ap->s_addr = htonl(addr); - } + /* Store it if requested */ + if (ap) { + ap->s_addr = htonl(addr); + } - return 1; + return 1; } /* }}} */ #endif /* !HAVE_INET_ATON */ diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 00af8ca1567..f20f4245bd4 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -1045,15 +1045,15 @@ static int php_stream_ftp_mkdir(php_stream_wrapper *wrapper, const char *url, in if (!recursive) { php_stream_printf(stream, "MKD %s\r\n", ZSTR_VAL(resource->path)); result = GET_FTP_RESULT(stream); - } else { - /* we look for directory separator from the end of string, thus hopefully reducing our work load */ - char *p, *e, *buf; + } else { + /* we look for directory separator from the end of string, thus hopefully reducing our work load */ + char *p, *e, *buf; - buf = estrndup(ZSTR_VAL(resource->path), ZSTR_LEN(resource->path)); - e = buf + ZSTR_LEN(resource->path); + buf = estrndup(ZSTR_VAL(resource->path), ZSTR_LEN(resource->path)); + e = buf + ZSTR_LEN(resource->path); - /* find a top level directory we need to create */ - while ((p = strrchr(buf, '/'))) { + /* find a top level directory we need to create */ + while ((p = strrchr(buf, '/'))) { *p = '\0'; php_stream_printf(stream, "CWD %s\r\n", strlen(buf) ? buf : "/"); result = GET_FTP_RESULT(stream); @@ -1088,7 +1088,7 @@ static int php_stream_ftp_mkdir(php_stream_wrapper *wrapper, const char *url, in } efree(buf); - } + } php_url_free(resource); php_stream_close(stream); diff --git a/ext/standard/html.c b/ext/standard/html.c index 6be1b762df0..b93ce95df19 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -346,13 +346,13 @@ static inline unsigned int get_next_char( } *cursor = pos; - return this_char; + return this_char; } /* }}} */ /* {{{ php_next_utf8_char * Public interface for get_next_char used with UTF-8 */ - PHPAPI unsigned int php_next_utf8_char( +PHPAPI unsigned int php_next_utf8_char( const unsigned char *str, size_t str_len, size_t *cursor, diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index b4cce22f88f..761d46b2c90 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -313,10 +313,10 @@ finish: php_stream_close(stream); stream = NULL; } - smart_str_free(&header); + smart_str_free(&header); - if (stream) { - char header_line[HTTP_HEADER_BLOCK_SIZE]; + if (stream) { + char header_line[HTTP_HEADER_BLOCK_SIZE]; /* get response header */ while (php_stream_gets(stream, header_line, HTTP_HEADER_BLOCK_SIZE-1) != NULL) { diff --git a/ext/standard/image.c b/ext/standard/image.c index ed180b7bca6..218476599a6 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -953,10 +953,10 @@ static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check) return 0; } width = (width << 7) | (i & 0x7f); - /* maximum valid width for wbmp (although 127 may be a more accurate one) */ - if (width > 2048) { - return 0; - } + /* maximum valid width for wbmp (although 127 may be a more accurate one) */ + if (width > 2048) { + return 0; + } } while (i & 0x80); /* get height */ @@ -966,10 +966,10 @@ static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check) return 0; } height = (height << 7) | (i & 0x7f); - /* maximum valid height for wbmp (although 127 may be a more accurate one) */ - if (height > 2048) { - return 0; - } + /* maximum valid height for wbmp (although 127 may be a more accurate one) */ + if (height > 2048) { + return 0; + } } while (i & 0x80); if (!height || !width) { @@ -1002,11 +1002,11 @@ static struct gfxinfo *php_handle_wbmp(php_stream * stream) /* {{{ php_get_xbm */ static int php_get_xbm(php_stream *stream, struct gfxinfo **result) { - char *fline; - char *iname; - char *type; - int value; - unsigned int width = 0, height = 0; + char *fline; + char *iname; + char *type; + int value; + unsigned int width = 0, height = 0; if (result) { *result = NULL; @@ -1280,7 +1280,7 @@ PHP_FUNCTION(image_type_to_extension) PHPAPI int php_getimagetype(php_stream * stream, const char *input, char *filetype) { char tmp[12]; - int twelve_bytes_read; + int twelve_bytes_read; if ( !filetype) filetype = tmp; if((php_stream_read(stream, filetype, 3)) != 3) { @@ -1341,11 +1341,11 @@ PHPAPI int php_getimagetype(php_stream * stream, const char *input, char *filety return IMAGE_FILETYPE_ICO; } - /* WBMP may be smaller than 12 bytes, so delay error */ + /* WBMP may be smaller than 12 bytes, so delay error */ twelve_bytes_read = (php_stream_read(stream, filetype+4, 8) == 8); /* BYTES READ: 12 */ - if (twelve_bytes_read && !memcmp(filetype, php_sig_jp2, 12)) { + if (twelve_bytes_read && !memcmp(filetype, php_sig_jp2, 12)) { return IMAGE_FILETYPE_JP2; } @@ -1353,10 +1353,10 @@ PHPAPI int php_getimagetype(php_stream * stream, const char *input, char *filety if (php_get_wbmp(stream, NULL, 1)) { return IMAGE_FILETYPE_WBMP; } - if (!twelve_bytes_read) { + if (!twelve_bytes_read) { php_error_docref(NULL, E_NOTICE, "Error reading from %s!", input); return IMAGE_FILETYPE_UNKNOWN; - } + } if (php_get_xbm(stream, NULL)) { return IMAGE_FILETYPE_XBM; } diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index 2dadb9c43f8..228e03fbe86 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -116,7 +116,7 @@ PHPAPI void php_register_incomplete_class_handlers(void) php_incomplete_object_handlers.unset_property = incomplete_class_unset_property; php_incomplete_object_handlers.write_property = incomplete_class_write_property; php_incomplete_object_handlers.get_property_ptr_ptr = incomplete_class_get_property_ptr_ptr; - php_incomplete_object_handlers.get_method = incomplete_class_get_method; + php_incomplete_object_handlers.get_method = incomplete_class_get_method; php_ce_incomplete_class->create_object = php_create_incomplete_object; } diff --git a/ext/standard/info.c b/ext/standard/info.c index 98d8d099709..aff7a95f277 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -776,7 +776,7 @@ PHPAPI ZEND_COLD void php_print_info(int flag) the_time = time(NULL); ta = php_localtime_r(&the_time, &tmbuf); - php_info_print("tm_mon==3) && (ta->tm_mday==1)) { php_info_print(PHP_EGG_LOGO_DATA_URI "\" alt=\"PHP logo\" />"); } else { @@ -865,7 +865,7 @@ PHPAPI ZEND_COLD void php_print_info(int flag) } else { descr = estrdup("disabled"); } - php_info_print_table_row(2, "Zend Multibyte Support", descr); + php_info_print_table_row(2, "Zend Multibyte Support", descr); efree(descr); } @@ -962,7 +962,7 @@ PHPAPI ZEND_COLD void php_print_info(int flag) php_info_print_table_row(2, tmp1, tmp2); efree(tmp1); } - tsrm_env_unlock(); + tsrm_env_unlock(); php_info_print_table_end(); } diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 05cf8e096ca..ce0f172426a 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -80,7 +80,7 @@ static int php_iptc_put1(FILE *fp, int spool, unsigned char c, unsigned char **s if (spoolbuf) *(*spoolbuf)++ = c; - return c; + return c; } /* }}} */ @@ -108,7 +108,7 @@ static int php_iptc_get1(FILE *fp, int spool, unsigned char **spoolbuf) /* {{{ php_iptc_read_remaining */ static int php_iptc_read_remaining(FILE *fp, int spool, unsigned char **spoolbuf) { - while (php_iptc_get1(fp, spool, spoolbuf) != EOF) continue; + while (php_iptc_get1(fp, spool, spoolbuf) != EOF) continue; return M_EOI; } @@ -120,9 +120,9 @@ static int php_iptc_skip_variable(FILE *fp, int spool, unsigned char **spoolbuf) unsigned int length; int c1, c2; - if ((c1 = php_iptc_get1(fp, spool, spoolbuf)) == EOF) return M_EOI; + if ((c1 = php_iptc_get1(fp, spool, spoolbuf)) == EOF) return M_EOI; - if ((c2 = php_iptc_get1(fp, spool, spoolbuf)) == EOF) return M_EOI; + if ((c2 = php_iptc_get1(fp, spool, spoolbuf)) == EOF) return M_EOI; length = (((unsigned char) c1) << 8) + ((unsigned char) c2); @@ -138,30 +138,30 @@ static int php_iptc_skip_variable(FILE *fp, int spool, unsigned char **spoolbuf) /* {{{ php_iptc_next_marker */ static int php_iptc_next_marker(FILE *fp, int spool, unsigned char **spoolbuf) { - int c; + int c; - /* skip unimportant stuff */ + /* skip unimportant stuff */ - c = php_iptc_get1(fp, spool, spoolbuf); + c = php_iptc_get1(fp, spool, spoolbuf); if (c == EOF) return M_EOI; - while (c != 0xff) { - if ((c = php_iptc_get1(fp, spool, spoolbuf)) == EOF) - return M_EOI; /* we hit EOF */ - } + while (c != 0xff) { + if ((c = php_iptc_get1(fp, spool, spoolbuf)) == EOF) + return M_EOI; /* we hit EOF */ + } - /* get marker byte, swallowing possible padding */ - do { - c = php_iptc_get1(fp, 0, 0); + /* get marker byte, swallowing possible padding */ + do { + c = php_iptc_get1(fp, 0, 0); if (c == EOF) - return M_EOI; /* we hit EOF */ + return M_EOI; /* we hit EOF */ else if (c == 0xff) php_iptc_put1(fp, spool, (unsigned char)c, spoolbuf); - } while (c == 0xff); + } while (c == 0xff); - return (unsigned int) c; + return (unsigned int) c; } /* }}} */ diff --git a/ext/standard/mt_rand.c b/ext/standard/mt_rand.c index 25f6a431a57..d1478af1bf2 100644 --- a/ext/standard/mt_rand.c +++ b/ext/standard/mt_rand.c @@ -343,7 +343,7 @@ PHP_FUNCTION(mt_getrandmax) * Melo: it could be 2^^32 but we only use 2^^31 to maintain * compatibility with the previous php_rand */ - RETURN_LONG(PHP_MT_RAND_MAX); /* 2^^31 */ + RETURN_LONG(PHP_MT_RAND_MAX); /* 2^^31 */ } /* }}} */ diff --git a/ext/standard/pack.c b/ext/standard/pack.c index bfad8081216..46856874bc2 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -109,8 +109,8 @@ static inline uint16_t php_pack_reverse_int16(uint16_t arg) /* {{{ php_pack_reverse_int32 */ static inline uint32_t php_pack_reverse_int32(uint32_t arg) { - uint32_t result; - result = ((arg & 0xFF) << 24) | ((arg & 0xFF00) << 8) | ((arg >> 8) & 0xFF00) | ((arg >> 24) & 0xFF); + uint32_t result; + result = ((arg & 0xFF) << 24) | ((arg & 0xFF00) << 8) | ((arg >> 8) & 0xFF00) | ((arg >> 24) & 0xFF); return result; } diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index f5472fc386d..e6aa2e43f4c 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -160,9 +160,9 @@ PHPAPI zend_string *php_quot_print_encode(const unsigned char *str, size_t lengt } else { if (iscntrl (c) || (c == 0x7f) || (c & 0x80) || (c == '=') || ((c == ' ') && (*str == '\015'))) { if ((((lp+= 3) > PHP_QPRINT_MAXL) && (c <= 0x7f)) - || ((c > 0x7f) && (c <= 0xdf) && ((lp + 3) > PHP_QPRINT_MAXL)) - || ((c > 0xdf) && (c <= 0xef) && ((lp + 6) > PHP_QPRINT_MAXL)) - || ((c > 0xef) && (c <= 0xf4) && ((lp + 9) > PHP_QPRINT_MAXL))) { + || ((c > 0x7f) && (c <= 0xdf) && ((lp + 3) > PHP_QPRINT_MAXL)) + || ((c > 0xdf) && (c <= 0xef) && ((lp + 6) > PHP_QPRINT_MAXL)) + || ((c > 0xef) && (c <= 0xf4) && ((lp + 9) > PHP_QPRINT_MAXL))) { *d++ = '='; *d++ = '\015'; *d++ = '\012'; diff --git a/ext/standard/string.c b/ext/standard/string.c index fc43d53ff15..1ce7bfee0e9 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1471,8 +1471,8 @@ PHP_FUNCTION(strtolower) static bool _is_basename_start(const char *start, const char *pos) { if (pos - start >= 1 - && *(pos-1) != '/' - && *(pos-1) != '\\') { + && *(pos-1) != '/' + && *(pos-1) != '\\') { if (pos - start == 1) { return 1; } else if (*(pos-2) == '/' || *(pos-2) == '\\') { @@ -5313,7 +5313,7 @@ PHP_FUNCTION(count_chars) add_index_long(return_value, inx, chars[inx]); } break; - case 2: + case 2: if (chars[inx] == 0) { add_index_long(return_value, inx, chars[inx]); } @@ -5323,7 +5323,7 @@ PHP_FUNCTION(count_chars) retstr[retlen++] = inx; } break; - case 4: + case 4: if (chars[inx] == 0) { retstr[retlen++] = inx; } diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index 8171b802e95..8cbc0db1c3f 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -54,9 +54,9 @@ compare_right(char const **a, char const *aend, char const **b, char const *bend if (!bias) bias = +1; } - } + } - return 0; + return 0; } /* }}} */ @@ -64,8 +64,8 @@ compare_right(char const **a, char const *aend, char const **b, char const *bend static int compare_left(char const **a, char const *aend, char const **b, char const *bend) { - /* Compare two left-aligned numbers: the first to have a - different value wins. */ + /* Compare two left-aligned numbers: the first to have a + different value wins. */ for(;; (*a)++, (*b)++) { if ((*a == aend || !isdigit((int)(unsigned char)**a)) && (*b == bend || !isdigit((int)(unsigned char)**b))) @@ -78,9 +78,9 @@ compare_left(char const **a, char const *aend, char const **b, char const *bend) return -1; else if (**a > **b) return +1; - } + } - return 0; + return 0; } /* }}} */ diff --git a/ext/standard/url.c b/ext/standard/url.c index efad0d77c2c..cc44d946ef3 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -587,7 +587,7 @@ PHP_FUNCTION(urldecode) out_str = zend_string_init(ZSTR_VAL(in_str), ZSTR_LEN(in_str), 0); ZSTR_LEN(out_str) = php_url_decode(ZSTR_VAL(out_str), ZSTR_LEN(out_str)); - RETURN_NEW_STR(out_str); + RETURN_NEW_STR(out_str); } /* }}} */ @@ -649,7 +649,7 @@ PHP_FUNCTION(rawurldecode) out_str = zend_string_init(ZSTR_VAL(in_str), ZSTR_LEN(in_str), 0); ZSTR_LEN(out_str) = php_raw_url_decode(ZSTR_VAL(out_str), ZSTR_LEN(out_str)); - RETURN_NEW_STR(out_str); + RETURN_NEW_STR(out_str); } /* }}} */ diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c index 771b38bf30a..aa60d974672 100644 --- a/ext/standard/versioning.c +++ b/ext/standard/versioning.c @@ -27,20 +27,20 @@ PHPAPI char * php_canonicalize_version(const char *version) { - size_t len = strlen(version); - char *buf = safe_emalloc(len, 2, 1), *q, lp, lq; - const char *p; + size_t len = strlen(version); + char *buf = safe_emalloc(len, 2, 1), *q, lp, lq; + const char *p; - if (len == 0) { - *buf = '\0'; - return buf; - } + if (len == 0) { + *buf = '\0'; + return buf; + } - p = version; - q = buf; - *q++ = lp = *p++; + p = version; + q = buf; + *q++ = lp = *p++; - while (*p) { + while (*p) { /* s/[-_+]/./g; * s/([^\d\.])([^\D\.])/$1.$2/g; * s/([^\D\.])([^\d\.])/$1.$2/g; @@ -67,9 +67,9 @@ php_canonicalize_version(const char *version) *q++ = *p; } lp = *p++; - } - *q++ = '\0'; - return buf; + } + *q++ = '\0'; + return buf; } /* }}} */ diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index 0a6c9a0363b..bedbbdda3c4 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -147,7 +147,7 @@ PHP_FUNCTION(shm_attach) if (shm_size < 1) { zend_argument_value_error(2, "must be greater than 0"); RETURN_THROWS(); - } + } /* get the id from a specified key or create new shared memory */ if ((shm_id = shmget(shm_key, 0, 0)) < 0) { diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 544feae05a0..acf73b8a7c6 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -105,15 +105,15 @@ } #define ADD_PROPERTY_STRINGL(_table, _key, _string, _len) \ - { \ - zval tmp; \ - if (_string) { \ - ZVAL_STRINGL(&tmp, (char *)_string, _len); \ - } else { \ - ZVAL_EMPTY_STRING(&tmp); \ - } \ - zend_hash_str_update(_table, #_key, sizeof(#_key) - 1, &tmp); \ - } + { \ + zval tmp; \ + if (_string) { \ + ZVAL_STRINGL(&tmp, (char *)_string, _len); \ + } else { \ + ZVAL_EMPTY_STRING(&tmp); \ + } \ + zend_hash_str_update(_table, #_key, sizeof(#_key) - 1, &tmp); \ + } #define ADD_PROPERTY_LONG(_table, _key, _long) \ { \ @@ -130,7 +130,7 @@ } #define ADD_PROPERTY_BOOL(_table, _key, _bool) \ - { \ + { \ zval tmp; \ ZVAL_BOOL(&tmp, _bool); \ zend_hash_str_update(_table, #_key, sizeof(#_key) - 1, &tmp); \ @@ -1305,7 +1305,7 @@ PHP_FUNCTION(tidy_getopt) if (!opt) { zend_argument_value_error(getThis() ? 1 : 2, "is an invalid configuration option, \"%s\" given", optname); - RETURN_THROWS(); + RETURN_THROWS(); } optval = php_tidy_get_opt_val(obj->ptdoc, opt, &optt); @@ -1363,7 +1363,7 @@ PHP_METHOD(tidy, __construct) if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) { zend_value_error("Input string is too long"); - RETURN_THROWS(); + RETURN_THROWS(); } TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); @@ -1401,7 +1401,7 @@ PHP_METHOD(tidy, parseFile) if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) { zend_value_error("Input string is too long"); - RETURN_THROWS(); + RETURN_THROWS(); } TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); diff --git a/ext/xml/compat.c b/ext/xml/compat.c index dfac3991722..2c23ed3c4d4 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -284,9 +284,9 @@ _pi_handler(void *user, const xmlChar *target, const xmlChar *data) static void _unparsed_entity_decl_handler(void *user, const xmlChar *name, - const xmlChar *pub_id, - const xmlChar *sys_id, - const xmlChar *notation) + const xmlChar *pub_id, + const xmlChar *sys_id, + const xmlChar *notation) { XML_Parser parser = (XML_Parser) user; diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 80fcb9d4454..f775adb4450 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -125,10 +125,10 @@ typedef struct { enum php_xml_option { - PHP_XML_OPTION_CASE_FOLDING = 1, - PHP_XML_OPTION_TARGET_ENCODING, - PHP_XML_OPTION_SKIP_TAGSTART, - PHP_XML_OPTION_SKIP_WHITE + PHP_XML_OPTION_CASE_FOLDING = 1, + PHP_XML_OPTION_TARGET_ENCODING, + PHP_XML_OPTION_SKIP_TAGSTART, + PHP_XML_OPTION_SKIP_WHITE }; /* {{{ dynamically loadable module stuff */ @@ -191,10 +191,10 @@ static const zend_module_dep xml_deps[] = { zend_module_entry xml_module_entry = { #ifdef LIBXML_EXPAT_COMPAT - STANDARD_MODULE_HEADER_EX, NULL, + STANDARD_MODULE_HEADER_EX, NULL, xml_deps, #else - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER, #endif "xml", /* extension name */ ext_functions, /* extension function list */ @@ -203,11 +203,11 @@ zend_module_entry xml_module_entry = { NULL, /* per-request startup function */ NULL, /* per-request shutdown function */ PHP_MINFO(xml), /* information function */ - PHP_XML_VERSION, - PHP_MODULE_GLOBALS(xml), /* globals descriptor */ - PHP_GINIT(xml), /* globals ctor */ - NULL, /* globals dtor */ - NULL, /* post deactivate */ + PHP_XML_VERSION, + PHP_MODULE_GLOBALS(xml), /* globals descriptor */ + PHP_GINIT(xml), /* globals ctor */ + NULL, /* globals dtor */ + NULL, /* post deactivate */ STANDARD_MODULE_PROPERTIES_EX }; @@ -1040,7 +1040,7 @@ static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int ns_supp object_init_ex(return_value, xml_parser_ce); parser = Z_XMLPARSER_P(return_value); parser->parser = XML_ParserCreate_MM((auto_detect ? NULL : encoding), - &php_xml_mem_hdlrs, (XML_Char*)ns_param); + &php_xml_mem_hdlrs, (XML_Char*)ns_param); parser->target_encoding = encoding; parser->case_folding = 1; diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 3c310047710..05283094290 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -1040,7 +1040,7 @@ PHP_METHOD(XMLReader, XML) inputbfr = xmlParserInputBufferCreateMem(source, source_len, XML_CHAR_ENCODING_NONE); - if (inputbfr != NULL) { + if (inputbfr != NULL) { /* Get the URI of the current script so that we can set the base directory in libxml */ #ifdef HAVE_GETCWD directory = VCWD_GETCWD(resolved_path, MAXPATHLEN); diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index ac25ed61c40..e9a3dff2781 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -446,13 +446,13 @@ PHP_FUNCTION(xmlwriter_write_element) if (ptr) { if (!content) { retval = xmlTextWriterStartElement(ptr, (xmlChar *)name); - if (retval == -1) { - RETURN_FALSE; - } + if (retval == -1) { + RETURN_FALSE; + } xmlTextWriterEndElement(ptr); - if (retval == -1) { - RETURN_FALSE; - } + if (retval == -1) { + RETURN_FALSE; + } } else { retval = xmlTextWriterWriteElement(ptr, (xmlChar *)name, (xmlChar *)content); } diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 8cb100a24cd..1bb2c462641 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -832,7 +832,7 @@ PHP_METHOD(XSLTProcessor, setSecurityPrefs) xsl_object *intern; zend_long securityPrefs, oldSecurityPrefs; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &securityPrefs) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &securityPrefs) == FAILURE) { RETURN_THROWS(); } intern = Z_XSL_P(id); diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index b8457844dba..0fc76b149f2 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -243,7 +243,7 @@ static zend_object *zend_test_class_new(zend_class_entry *class_type) static zend_function *zend_test_class_method_get(zend_object **object, zend_string *name, const zval *key) { - if (zend_string_equals_literal_ci(name, "test")) { + if (zend_string_equals_literal_ci(name, "test")) { zend_internal_function *fptr; if (EXPECTED(EG(trampoline).common.function_name == NULL)) { @@ -260,7 +260,7 @@ static zend_function *zend_test_class_method_get(zend_object **object, zend_stri fptr->handler = ZEND_FN(zend_test_func); return (zend_function*)fptr; - } + } return zend_std_get_method(object, name, key); } @@ -471,11 +471,11 @@ ZEND_GET_MODULE(zend_test) PHP_ZEND_TEST_API struct bug79096 bug79096(void) { - struct bug79096 b; + struct bug79096 b; - b.a = 1; - b.b = 1; - return b; + b.a = 1; + b.b = 1; + return b; } PHP_ZEND_TEST_API void bug79532(off_t *array, size_t elems) @@ -503,5 +503,5 @@ typedef struct bug80847_02 { PHP_ZEND_TEST_API bug80847_02 ffi_bug80847(bug80847_02 s) { s.a.b += 10; s.a.c -= 10.0; - return s; + return s; } diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 2ed24b79b94..a9b8d36fa87 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -346,7 +346,7 @@ static php_output_handler *php_zlib_output_handler_init(const char *handler_name ZLIBG(output_compression) = chunk_size ? chunk_size : PHP_OUTPUT_HANDLER_DEFAULT_SIZE; } - ZLIBG(handler_registered) = 1; + ZLIBG(handler_registered) = 1; if ((h = php_output_handler_create_internal(handler_name, handler_name_len, php_zlib_output_handler, chunk_size, flags))) { php_output_handler_set_context(h, php_zlib_output_handler_context_init(), php_zlib_output_handler_context_dtor); @@ -1417,10 +1417,10 @@ static PHP_MSHUTDOWN_FUNCTION(zlib) static PHP_RINIT_FUNCTION(zlib) { ZLIBG(compression_coding) = 0; - if (!ZLIBG(handler_registered)) { - ZLIBG(output_compression) = ZLIBG(output_compression_default); - php_zlib_output_compression_start(); - } + if (!ZLIBG(handler_registered)) { + ZLIBG(output_compression) = ZLIBG(output_compression_default); + php_zlib_output_compression_start(); + } return SUCCESS; } @@ -1430,9 +1430,9 @@ static PHP_RINIT_FUNCTION(zlib) static PHP_RSHUTDOWN_FUNCTION(zlib) { php_zlib_cleanup_ob_gzhandler_mess(); - ZLIBG(handler_registered) = 0; + ZLIBG(handler_registered) = 0; - return SUCCESS; + return SUCCESS; } /* }}} */ @@ -1458,7 +1458,7 @@ static PHP_GINIT_FUNCTION(zlib) ZEND_TSRMLS_CACHE_UPDATE(); #endif zlib_globals->ob_gzhandler = NULL; - zlib_globals->handler_registered = 0; + zlib_globals->handler_registered = 0; } /* }}} */ diff --git a/main/SAPI.c b/main/SAPI.c index d3cc29ec023..52509e3b017 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -340,7 +340,7 @@ SAPI_API char *sapi_get_default_content_type(void) SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header) { - uint32_t len; + uint32_t len; default_header->header = get_default_content_type(sizeof("Content-type: ")-1, &len); default_header->header_len = len; diff --git a/main/fastcgi.c b/main/fastcgi.c index 77217d728dc..013e45e9690 100644 --- a/main/fastcgi.c +++ b/main/fastcgi.c @@ -154,12 +154,12 @@ typedef struct _fcgi_begin_request_rec { } fcgi_begin_request_rec; typedef struct _fcgi_end_request { - unsigned char appStatusB3; - unsigned char appStatusB2; - unsigned char appStatusB1; - unsigned char appStatusB0; - unsigned char protocolStatus; - unsigned char reserved[3]; + unsigned char appStatusB3; + unsigned char appStatusB2; + unsigned char appStatusB1; + unsigned char appStatusB0; + unsigned char protocolStatus; + unsigned char reserved[3]; } fcgi_end_request; typedef struct _fcgi_end_request_rec { diff --git a/main/getopt.c b/main/getopt.c index 9621c805c1b..85871f16402 100644 --- a/main/getopt.c +++ b/main/getopt.c @@ -164,7 +164,7 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char /* Optional value is not supported with - style */ } else if (opts[php_optidx].need_param == 1) { *optarg = argv[(*optind)++]; - } + } } else if (argv[*optind][arg_start] == '=') { arg_start++; *optarg = &argv[*optind][arg_start]; diff --git a/main/main.c b/main/main.c index ff29bc2d78b..114a4c37c60 100644 --- a/main/main.c +++ b/main/main.c @@ -1955,7 +1955,7 @@ static int php_register_extensions_bc(zend_module_entry *ptr, int count) while (count--) { if (zend_register_internal_module(ptr++) == NULL) { return FAILURE; - } + } } return SUCCESS; } @@ -2342,7 +2342,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod /* Don't leak errors from startup into the per-request phase. */ clear_last_error(); shutdown_memory_manager(1, 0); - virtual_cwd_activate(); + virtual_cwd_activate(); zend_interned_strings_switch_storage(1); @@ -2482,13 +2482,13 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file) VCWD_CHDIR_FILE(ZSTR_VAL(primary_file->filename)); } - /* Only lookup the real file path and add it to the included_files list if already opened + /* Only lookup the real file path and add it to the included_files list if already opened * otherwise it will get opened and added to the included_files list in zend_execute_scripts */ if (primary_file->filename && !zend_string_equals_literal(primary_file->filename, "Standard input code") && - primary_file->opened_path == NULL && - primary_file->type != ZEND_HANDLE_FILENAME + primary_file->opened_path == NULL && + primary_file->type != ZEND_HANDLE_FILENAME ) { if (expand_filepath(ZSTR_VAL(primary_file->filename), realfile)) { primary_file->opened_path = zend_string_init(realfile, strlen(realfile), 0); diff --git a/main/network.c b/main/network.c index 0dffd790b03..788a7a8591d 100644 --- a/main/network.c +++ b/main/network.c @@ -100,36 +100,36 @@ const struct in6_addr in6addr_any = {0}; /* IN6ADDR_ANY_INIT; */ /* {{{ php_gai_strerror */ static const char *php_gai_strerror(int code) { - static struct { - int code; - const char *msg; - } values[] = { + static struct { + int code; + const char *msg; + } values[] = { # ifdef EAI_ADDRFAMILY - {EAI_ADDRFAMILY, "Address family for hostname not supported"}, + {EAI_ADDRFAMILY, "Address family for hostname not supported"}, # endif - {EAI_AGAIN, "Temporary failure in name resolution"}, - {EAI_BADFLAGS, "Bad value for ai_flags"}, - {EAI_FAIL, "Non-recoverable failure in name resolution"}, - {EAI_FAMILY, "ai_family not supported"}, - {EAI_MEMORY, "Memory allocation failure"}, + {EAI_AGAIN, "Temporary failure in name resolution"}, + {EAI_BADFLAGS, "Bad value for ai_flags"}, + {EAI_FAIL, "Non-recoverable failure in name resolution"}, + {EAI_FAMILY, "ai_family not supported"}, + {EAI_MEMORY, "Memory allocation failure"}, # ifdef EAI_NODATA - {EAI_NODATA, "No address associated with hostname"}, + {EAI_NODATA, "No address associated with hostname"}, # endif - {EAI_NONAME, "Name or service not known"}, - {EAI_SERVICE, "Servname not supported for ai_socktype"}, - {EAI_SOCKTYPE, "ai_socktype not supported"}, - {EAI_SYSTEM, "System error"}, - {0, NULL} - }; - int i; + {EAI_NONAME, "Name or service not known"}, + {EAI_SERVICE, "Servname not supported for ai_socktype"}, + {EAI_SOCKTYPE, "ai_socktype not supported"}, + {EAI_SYSTEM, "System error"}, + {0, NULL} + }; + int i; - for (i = 0; values[i].msg != NULL; i++) { - if (values[i].code == code) { - return (char *)values[i].msg; - } - } + for (i = 0; values[i].msg != NULL; i++) { + if (values[i].code == code) { + return (char *)values[i].msg; + } + } - return "Unknown error"; + return "Unknown error"; } /* }}} */ #endif @@ -285,9 +285,9 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka #ifdef PHP_WIN32 typedef u_long php_non_blocking_flags_t; # define SET_SOCKET_BLOCKING_MODE(sock, save) \ - save = TRUE; ioctlsocket(sock, FIONBIO, &save) + save = TRUE; ioctlsocket(sock, FIONBIO, &save) # define RESTORE_SOCKET_BLOCKING_MODE(sock, save) \ - ioctlsocket(sock, FIONBIO, &save) + ioctlsocket(sock, FIONBIO, &save) #else typedef int php_non_blocking_flags_t; # define SET_SOCKET_BLOCKING_MODE(sock, save) \ diff --git a/main/output.c b/main/output.c index 5d9b12bf116..2258bc2507e 100644 --- a/main/output.c +++ b/main/output.c @@ -695,7 +695,7 @@ PHPAPI int php_output_handler_hook(php_output_handler_hook_t type, void *arg) return SUCCESS; case PHP_OUTPUT_HANDLER_HOOK_GET_LEVEL: *(int *) arg = OG(running)->level; - return SUCCESS; + return SUCCESS; case PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE: OG(running)->flags &= ~(PHP_OUTPUT_HANDLER_REMOVABLE|PHP_OUTPUT_HANDLER_CLEANABLE); return SUCCESS; diff --git a/main/php_ticks.c b/main/php_ticks.c index f00b6e25cad..004314583bd 100644 --- a/main/php_ticks.c +++ b/main/php_ticks.c @@ -41,9 +41,9 @@ void php_shutdown_ticks(void) static int php_compare_tick_functions(void *elem1, void *elem2) { - struct st_tick_function *e1 = (struct st_tick_function *)elem1; - struct st_tick_function *e2 = (struct st_tick_function *)elem2; - return e1->func == e2->func && e1->arg == e2->arg; + struct st_tick_function *e1 = (struct st_tick_function *)elem1; + struct st_tick_function *e2 = (struct st_tick_function *)elem2; + return e1->func == e2->func && e1->arg == e2->arg; } PHPAPI void php_add_tick_function(void (*func)(int, void*), void * arg) diff --git a/main/snprintf.c b/main/snprintf.c index c7adbc7d079..19619fe18d9 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -124,7 +124,7 @@ static inline char *php_ecvt(double value, int ndigit, int *decpt, int *sign) /* static inline char *php_fcvt(double value, int ndigit, int *decpt, int *sign) /* {{{ */ { - return(__cvt(value, ndigit, decpt, sign, 1, 1)); + return(__cvt(value, ndigit, decpt, sign, 1, 1)); } /* }}} */ @@ -216,13 +216,13 @@ PHPAPI char *php_gcvt(double value, int ndigit, char dec_point, char exponent, c } *dst++ = dec_point; for (i = decpt; digits[i] != '\0'; i++) { - *dst++ = digits[i]; - } - } - *dst = '\0'; - } - zend_freedtoa(digits); - return (buf); + *dst++ = digits[i]; + } + } + *dst = '\0'; + } + zend_freedtoa(digits); + return (buf); } /* }}} */ @@ -547,7 +547,7 @@ typedef struct buf_area buffy; * to be printed. */ #define FIX_PRECISION( adjust, precision, s, s_len ) \ - if ( adjust ) \ + if ( adjust ) \ while ( s_len < (size_t)precision ) \ { \ *--s = '0' ; \ diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index b9ab0deab20..c2f68fa1412 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1291,7 +1291,7 @@ static int php_plain_files_rename(php_stream_wrapper *wrapper, const char *url_f if (errno == EXDEV) { zend_stat_t sb; # if !defined(ZTS) && !defined(TSRM_WIN32) - /* not sure what to do in ZTS case, umask is not thread-safe */ + /* not sure what to do in ZTS case, umask is not thread-safe */ int oldmask = umask(077); # endif int success = 0; diff --git a/main/streams/streams.c b/main/streams/streams.c index 6bcff11be38..6a37bc558be 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -140,11 +140,11 @@ PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream * static zend_llist *php_get_wrapper_errors_list(php_stream_wrapper *wrapper) { - if (!FG(wrapper_errors)) { - return NULL; - } else { - return (zend_llist*) zend_hash_str_find_ptr(FG(wrapper_errors), (const char*)&wrapper, sizeof(wrapper)); - } + if (!FG(wrapper_errors)) { + return NULL; + } else { + return (zend_llist*) zend_hash_str_find_ptr(FG(wrapper_errors), (const char*)&wrapper, sizeof(wrapper)); + } } /* {{{ wrapper error reporting */ @@ -1121,8 +1121,8 @@ static ssize_t _php_stream_write_buffer(php_stream *stream, const char *buf, siz { ssize_t didwrite = 0; - /* if we have a seekable stream we need to ensure that data is written at the - * current stream->position. This means invalidating the read buffer and then + /* if we have a seekable stream we need to ensure that data is written at the + * current stream->position. This means invalidating the read buffer and then * performing a low-level seek */ if (stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0 && stream->readpos != stream->writepos) { stream->readpos = stream->writepos = 0; @@ -1691,11 +1691,11 @@ void php_shutdown_stream_hashes(void) FG(stream_filters) = NULL; } - if (FG(wrapper_errors)) { + if (FG(wrapper_errors)) { zend_hash_destroy(FG(wrapper_errors)); efree(FG(wrapper_errors)); FG(wrapper_errors) = NULL; - } + } } int php_init_stream_wrappers(int module_number) @@ -1913,7 +1913,7 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, const } if (wrapper && wrapper->is_url && - (options & STREAM_DISABLE_URL_PROTECTION) == 0 && + (options & STREAM_DISABLE_URL_PROTECTION) == 0 && (!PG(allow_url_fopen) || (((options & STREAM_OPEN_FOR_INCLUDE) || PG(in_user_include)) && !PG(allow_url_include)))) { diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 1713146284a..d134188c0e9 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -1101,7 +1101,7 @@ static int user_wrapper_unlink(php_stream_wrapper *wrapper, const char *url, int ret = (Z_TYPE(zretval) == IS_TRUE); } else if (call_result == FAILURE) { php_error_docref(NULL, E_WARNING, "%s::" USERSTREAM_UNLINK " is not implemented!", ZSTR_VAL(uwrap->ce->name)); - } + } /* clean up */ zval_ptr_dtor(&object); @@ -1145,7 +1145,7 @@ static int user_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from ret = (Z_TYPE(zretval) == IS_TRUE); } else if (call_result == FAILURE) { php_error_docref(NULL, E_WARNING, "%s::" USERSTREAM_RENAME " is not implemented!", ZSTR_VAL(uwrap->ce->name)); - } + } /* clean up */ zval_ptr_dtor(&object); @@ -1191,7 +1191,7 @@ static int user_wrapper_mkdir(php_stream_wrapper *wrapper, const char *url, int ret = (Z_TYPE(zretval) == IS_TRUE); } else if (call_result == FAILURE) { php_error_docref(NULL, E_WARNING, "%s::" USERSTREAM_MKDIR " is not implemented!", ZSTR_VAL(uwrap->ce->name)); - } + } /* clean up */ zval_ptr_dtor(&object); @@ -1237,7 +1237,7 @@ static int user_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, ret = (Z_TYPE(zretval) == IS_TRUE); } else if (call_result == FAILURE) { php_error_docref(NULL, E_WARNING, "%s::" USERSTREAM_RMDIR " is not implemented!", ZSTR_VAL(uwrap->ce->name)); - } + } /* clean up */ zval_ptr_dtor(&object); @@ -1307,7 +1307,7 @@ static int user_wrapper_metadata(php_stream_wrapper *wrapper, const char *url, i ret = Z_TYPE(zretval) == IS_TRUE; } else if (call_result == FAILURE) { php_error_docref(NULL, E_WARNING, "%s::" USERSTREAM_METADATA " is not implemented!", ZSTR_VAL(uwrap->ce->name)); - } + } /* clean up */ zval_ptr_dtor(&object); diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index cb15e02d9ff..ee992720dd1 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -155,7 +155,7 @@ static const opt_struct OPTIONS[] = { {'?', 0, "usage"},/* help alias (both '?' and 'usage') */ {'v', 0, "version"}, {'z', 1, "zend-extension"}, - {'T', 1, "timing"}, + {'T', 1, "timing"}, {'-', 0, NULL} /* end of args */ }; @@ -1083,7 +1083,7 @@ static int is_valid_path(const char *path) #define CGI_GETENV(name) \ ((has_env) ? \ FCGI_GETENV(request, name) : \ - getenv(name)) + getenv(name)) #define CGI_PUTENV(name, value) \ ((has_env) ? \ @@ -1228,8 +1228,8 @@ static void init_request_info(fcgi_request *request) } if (env_path_translated != NULL && env_redirect_url != NULL && - env_path_translated != script_path_translated && - strcmp(env_path_translated, script_path_translated) != 0) { + env_path_translated != script_path_translated && + strcmp(env_path_translated, script_path_translated) != 0) { /* * pretty much apache specific. If we have a redirect_url * then our script_filename and script_name point to the diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index a6c47e18590..2a285d43657 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1244,7 +1244,7 @@ int main(int argc, char *argv[]) if (ini_path_override) { free(ini_path_override); } - ini_path_override = strdup(php_optarg); + ini_path_override = strdup(php_optarg); break; case 'n': ini_ignore = 1; diff --git a/sapi/cli/php_cli_process_title.c b/sapi/cli/php_cli_process_title.c index 9d4cfd284d9..a57f55b3e2c 100644 --- a/sapi/cli/php_cli_process_title.c +++ b/sapi/cli/php_cli_process_title.c @@ -25,41 +25,41 @@ /* {{{ Return a boolean to confirm if the process title was successfully changed or not */ PHP_FUNCTION(cli_set_process_title) { - char *title = NULL; - size_t title_len; - int rc; + char *title = NULL; + size_t title_len; + int rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &title, &title_len) == FAILURE) { - RETURN_THROWS(); - } + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &title, &title_len) == FAILURE) { + RETURN_THROWS(); + } - rc = set_ps_title(title); - if (rc == PS_TITLE_SUCCESS) { - RETURN_TRUE; - } + rc = set_ps_title(title); + if (rc == PS_TITLE_SUCCESS) { + RETURN_TRUE; + } - php_error_docref(NULL, E_WARNING, "cli_set_process_title had an error: %s", ps_title_errno(rc)); - RETURN_FALSE; + php_error_docref(NULL, E_WARNING, "cli_set_process_title had an error: %s", ps_title_errno(rc)); + RETURN_FALSE; } /* }}} */ /* {{{ Return a string with the current process title. NULL if error. */ PHP_FUNCTION(cli_get_process_title) { - int length = 0; - const char* title = NULL; - int rc; + int length = 0; + const char* title = NULL; + int rc; - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } - rc = get_ps_title(&length, &title); - if (rc != PS_TITLE_SUCCESS) { - php_error_docref(NULL, E_WARNING, "cli_get_process_title had an error: %s", ps_title_errno(rc)); - RETURN_NULL(); - } + rc = get_ps_title(&length, &title); + if (rc != PS_TITLE_SUCCESS) { + php_error_docref(NULL, E_WARNING, "cli_get_process_title had an error: %s", ps_title_errno(rc)); + RETURN_NULL(); + } - RETURN_STRINGL(title, length); + RETURN_STRINGL(title, length); } /* }}} */ diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c index fd2976af6d9..1679246ab98 100644 --- a/sapi/embed/php_embed.c +++ b/sapi/embed/php_embed.c @@ -177,7 +177,7 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv) #ifdef ZTS php_tsrm_startup(); # ifdef PHP_WIN32 - ZEND_TSRMLS_CACHE_UPDATE(); + ZEND_TSRMLS_CACHE_UPDATE(); # endif #endif diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index dd56f2fc4f6..625ee2f43e6 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -440,10 +440,10 @@ int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop, int nb_to } if (!warned && fpm_global_config.process_max > 0 && fpm_globals.running_children >= fpm_global_config.process_max) { - if (wp->running_children < max) { - warned = 1; - zlog(ZLOG_WARNING, "The maximum number of processes has been reached. Please review your configuration and consider raising 'process.max'"); - } + if (wp->running_children < max) { + warned = 1; + zlog(ZLOG_WARNING, "The maximum number of processes has been reached. Please review your configuration and consider raising 'process.max'"); + } } return 1; /* we are done */ diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index 6825464feeb..09d2302806b 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -106,21 +106,21 @@ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */ static void *fpm_get_in_addr(struct sockaddr *sa) /* {{{ */ { - if (sa->sa_family == AF_INET) { - return &(((struct sockaddr_in*)sa)->sin_addr); - } + if (sa->sa_family == AF_INET) { + return &(((struct sockaddr_in*)sa)->sin_addr); + } - return &(((struct sockaddr_in6*)sa)->sin6_addr); + return &(((struct sockaddr_in6*)sa)->sin6_addr); } /* }}} */ static int fpm_get_in_port(struct sockaddr *sa) /* {{{ */ { - if (sa->sa_family == AF_INET) { - return ntohs(((struct sockaddr_in*)sa)->sin_port); - } + if (sa->sa_family == AF_INET) { + return ntohs(((struct sockaddr_in*)sa)->sin_port); + } - return ntohs(((struct sockaddr_in6*)sa)->sin6_port); + return ntohs(((struct sockaddr_in6*)sa)->sin6_port); } /* }}} */ diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 0bdc9c5a241..4503e85d928 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -1162,9 +1162,9 @@ int main(int argc, char **argv) /* {{{ */ setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #else - struct sigaction signal_struct; - signal_struct.sa_sigaction = phpdbg_signal_handler; - signal_struct.sa_flags = SA_SIGINFO | SA_NODEFER; + struct sigaction signal_struct; + signal_struct.sa_sigaction = phpdbg_signal_handler; + signal_struct.sa_flags = SA_SIGINFO | SA_NODEFER; #endif phpdbg_main: @@ -1411,8 +1411,8 @@ phpdbg_main: if (phpdbg->startup(phpdbg) == SUCCESS) { zend_mm_heap *mm_heap; #ifdef _WIN32 - EXCEPTION_POINTERS *xp; - __try { + EXCEPTION_POINTERS *xp; + __try { #endif if (show_version || show_help) { @@ -1522,7 +1522,7 @@ phpdbg_main: zend_try { zend_sigaction(SIGSEGV, &signal_struct, &PHPDBG_G(old_sigsegv_signal)); } zend_end_try(); zend_try { zend_sigaction(SIGBUS, &signal_struct, &PHPDBG_G(old_sigsegv_signal)); } zend_end_try(); #endif - zend_try { zend_signal(SIGINT, phpdbg_sigint_handler); } zend_end_try(); + zend_try { zend_signal(SIGINT, phpdbg_sigint_handler); } zend_end_try(); PHPDBG_G(io)[PHPDBG_STDIN].fd = fileno(stdin); diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index de1afe6b9a1..7e6a87fcc89 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -757,7 +757,7 @@ PHPDBG_API char *phpdbg_read_input(const char *buffered) /* {{{ */ buffer = estrdup(cmd); free(cmd); #else - phpdbg_write("%s", phpdbg_get_prompt()); + phpdbg_write("%s", phpdbg_get_prompt()); phpdbg_consume_stdin_line(buf); buffer = estrdup(buf); #endif @@ -797,7 +797,7 @@ PHPDBG_API void phpdbg_destroy_input(char **input) /*{{{ */ } /* }}} */ PHPDBG_API int phpdbg_ask_user_permission(const char *question) { - char buf[PHPDBG_MAX_CMD]; + char buf[PHPDBG_MAX_CMD]; phpdbg_out("%s", question); phpdbg_out(" (type y or n): "); diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index a1b4a780f51..5edca645150 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1100,7 +1100,7 @@ PHPDBG_COMMAND(info) /* {{{ */ phpdbg_writeln("Libedit no"); # endif #else - phpdbg_writeln("Readline unavailable"); + phpdbg_writeln("Readline unavailable"); #endif phpdbg_writeln("Exec %s", PHPDBG_G(exec) ? PHPDBG_G(exec) : "none"); diff --git a/win32/codepage.c b/win32/codepage.c index 07394f3598d..34f775c8aaf 100644 --- a/win32/codepage.c +++ b/win32/codepage.c @@ -634,10 +634,10 @@ PHP_FUNCTION(sapi_windows_cp_conv) zend_string *subject; ZEND_PARSE_PARAMETERS_START(3, 3) - Z_PARAM_STR_OR_LONG(string_in_codepage, int_in_codepage) - Z_PARAM_STR_OR_LONG(string_out_codepage, int_out_codepage) - Z_PARAM_STR(subject) - ZEND_PARSE_PARAMETERS_END(); + Z_PARAM_STR_OR_LONG(string_in_codepage, int_in_codepage) + Z_PARAM_STR_OR_LONG(string_out_codepage, int_out_codepage) + Z_PARAM_STR(subject) + ZEND_PARSE_PARAMETERS_END(); if (ZEND_SIZE_T_INT_OVFL(ZSTR_LEN(subject))) { zend_argument_value_error(1, "is too long"); diff --git a/win32/console.c b/win32/console.c index 0784891715e..9b485610888 100644 --- a/win32/console.c +++ b/win32/console.c @@ -25,9 +25,9 @@ PHP_WINUTIL_API BOOL php_win32_console_fileno_is_console(zend_long fileno) HANDLE handle = (HANDLE) _get_osfhandle(fileno); if (handle != INVALID_HANDLE_VALUE) { - DWORD mode; - if (GetConsoleMode(handle, &mode)) { - result = TRUE; + DWORD mode; + if (GetConsoleMode(handle, &mode)) { + result = TRUE; } } return result; diff --git a/win32/inet.c b/win32/inet.c index ac10238c131..3d5a847eb6e 100644 --- a/win32/inet.c +++ b/win32/inet.c @@ -17,11 +17,11 @@ #include "inet.h" int inet_aton(const char *cp, struct in_addr *inp) { - inp->s_addr = inet_addr(cp); + inp->s_addr = inet_addr(cp); - if (inp->s_addr == INADDR_NONE) { - return 0; - } + if (inp->s_addr == INADDR_NONE) { + return 0; + } - return 1; + return 1; }