From: Antonio Borneo Date: Mon, 6 May 2019 09:29:17 +0000 (+0200) Subject: coding style: remove unnecessary parentheses X-Git-Tag: v0.11.0-rc1~463 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=8105c46ba5d219345cc554fd958a65f4e26ae9ce coding style: remove unnecessary parentheses Identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types UNNECESSARY_PARENTHESES -f {} \; then fixed manually. Change-Id: Ia2d9a0953d9b89fc87dc1195aa05c7f63c068c48 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/5196 Tested-by: jenkins Reviewed-by: Tomas Vanek --- diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 7f59401b1f..9a1f2b16fe 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -919,7 +919,7 @@ static int cortex_m_step(struct target *target, int current, * a normal step, otherwise we have to manually step over the bkpt * instruction - as such simulate a step */ if (bkpt_inst_found == false) { - if ((cortex_m->isrmasking_mode != CORTEX_M_ISRMASK_AUTO)) { + if (cortex_m->isrmasking_mode != CORTEX_M_ISRMASK_AUTO) { /* Automatic ISR masking mode off: Just step over the next * instruction, with interrupts on or off as appropriate. */ cortex_m_set_maskints_for_step(target); diff --git a/src/target/stm8.c b/src/target/stm8.c index 54a4bce262..6b03bb5a4e 100644 --- a/src/target/stm8.c +++ b/src/target/stm8.c @@ -356,7 +356,7 @@ static int stm8_set_hwbreak(struct target *target, if ((comparator_list[0].type != HWBRK_EXEC) && (comparator_list[1].type != HWBRK_EXEC)) { - if ((comparator_list[0].type != comparator_list[1].type)) { + if (comparator_list[0].type != comparator_list[1].type) { LOG_ERROR("data hw breakpoints must be of same type"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; }