Clean up const usage to avoid excessive casting 68/1668/3
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Mon, 30 Sep 2013 21:16:20 +0000 (23:16 +0200)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 31 Oct 2013 20:42:34 +0000 (20:42 +0000)
commit517ba0690dcc9e859a05df2113ce32401a5ab254
tree7f437e78a54eb7cb6af06ed589c8ceef0c5277bf
parentc044c601213ee800cffb21e1f53a89285b3346c9
Clean up const usage to avoid excessive casting

Don't use const on pointers that hold heap allocated data, because that
means functions that free them must cast away the const.

Do use const on pointer parameters or fields that needn't be modified.

Remove pointer casts that are no longer needed after fixing the constness.

Change-Id: I5d206f5019982fd1950bc6d6d07b6062dc24e886
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1668
Tested-by: jenkins
Reviewed-by: Mathias K├╝ster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
24 files changed:
src/helper/command.c
src/helper/command.h
src/helper/fileio.c
src/jtag/aice/aice_transport.c
src/jtag/core.c
src/jtag/drivers/ulink.c
src/jtag/hla/hla_tcl.c
src/jtag/jtag.h
src/jtag/tcl.c
src/rtos/ChibiOS.c
src/rtos/embKernel.c
src/rtos/linux.c
src/server/gdb_server.c
src/server/server.c
src/server/server.h
src/server/tcl_server.c
src/server/telnet_server.c
src/target/mips32_dmaacc.c
src/target/mips32_dmaacc.h
src/target/mips32_pracc.c
src/target/mips32_pracc.h
src/target/mips_m4k.c
src/target/target.c
src/target/target.h

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)