aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/aice
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2019-05-06 00:35:52 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2020-05-09 14:39:19 +0100
commite66bb9d3121eef35c312997aacb401847249a5cb (patch)
tree0d33157ce316c781aea167484999c3736bf1555f /src/jtag/aice
parent9b29cb58acbd14ed831d68fce4d6e6a1728f8caf (diff)
downloadriscv-openocd-e66bb9d3121eef35c312997aacb401847249a5cb.zip
riscv-openocd-e66bb9d3121eef35c312997aacb401847249a5cb.tar.gz
riscv-openocd-e66bb9d3121eef35c312997aacb401847249a5cb.tar.bz2
coding style: add parenthesis around the argument of sizeof
The script checkpatch available in new Linux kernel offers an experimental feature for automatically fix the code in place. While still experimental, the feature works quite well for simple fixes, like parenthesis. This patch has been created automatically with the script under review for inclusion in OpenOCD, using the command: find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types SIZEOF_PARENTHESIS --fix-inplace -f {} \; Change-Id: I8adb325bdb0e13211f8bae8b4770ec1979c176bf Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5618 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
Diffstat (limited to 'src/jtag/aice')
-rw-r--r--src/jtag/aice/aice_transport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/aice/aice_transport.c b/src/jtag/aice/aice_transport.c
index d0f7a49..ea710ad 100644
--- a/src/jtag/aice/aice_transport.c
+++ b/src/jtag/aice/aice_transport.c
@@ -174,7 +174,7 @@ COMMAND_HANDLER(handle_scan_chain_command)
while (tap) {
uint32_t expected, expected_mask, ii;
- snprintf(expected_id, sizeof expected_id, "0x%08x",
+ snprintf(expected_id, sizeof(expected_id), "0x%08x",
(unsigned)((tap->expected_ids_cnt > 0)
? tap->expected_ids[0]
: 0));
@@ -196,7 +196,7 @@ COMMAND_HANDLER(handle_scan_chain_command)
(unsigned int)(expected_mask));
for (ii = 1; ii < tap->expected_ids_cnt; ii++) {
- snprintf(expected_id, sizeof expected_id, "0x%08x",
+ snprintf(expected_id, sizeof(expected_id), "0x%08x",
(unsigned) tap->expected_ids[ii]);
if (tap->ignore_version)
expected_id[2] = '*';