From 517ba0690dcc9e859a05df2113ce32401a5ab254 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Mon, 30 Sep 2013 23:16:20 +0200 Subject: Clean up const usage to avoid excessive casting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://openocd.zylin.com/1668 Tested-by: jenkins Reviewed-by: Mathias Küster Reviewed-by: Spencer Oliver --- src/target/mips32_dmaacc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/target/mips32_dmaacc.h') diff --git a/src/target/mips32_dmaacc.h b/src/target/mips32_dmaacc.h index 15dd677b..45d5b361 100644 --- a/src/target/mips32_dmaacc.h +++ b/src/target/mips32_dmaacc.h @@ -38,6 +38,6 @@ int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf); int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, - uint32_t addr, int size, int count, void *buf); + uint32_t addr, int size, int count, const void *buf); #endif -- cgit v1.2.3-18-g5258