From: Pedro Alves Date: Thu, 12 Dec 2013 10:44:42 +0000 (+0000) Subject: breakpoint.c:insert_bp_location: Constify local. X-Git-Tag: hjl/linux/release/2.24.51.0.2~3^2~1^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b15e5c540f4b90dbec13bcd5cbac90f9224aef4b;p=thirdparty%2Fbinutils-gdb.git breakpoint.c:insert_bp_location: Constify local. gdb/ 2013-12-12 Pedro Alves * breakpoint.c (insert_bp_location): Make 'hw_bp_err_string' local const, and remove casts. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 637a462b6f4..c49895b7b50 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-12-12 Pedro Alves + + * breakpoint.c (insert_bp_location): Make 'hw_bp_err_string' local + const, and remove casts. + 2013-12-12 Pedro Alves * cli/cli-cmds.c (source_script_from_stream) Use have_python diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 111660fce1a..589aa19b5c7 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2396,7 +2396,7 @@ insert_bp_location (struct bp_location *bl, int *hw_bp_error_explained_already) { int val = 0; - char *hw_bp_err_string = NULL; + const char *hw_bp_err_string = NULL; struct gdb_exception e; if (!should_be_inserted (bl) || (bl->inserted && !bl->needs_update)) @@ -2501,7 +2501,7 @@ insert_bp_location (struct bp_location *bl, if (e.reason < 0) { val = 1; - hw_bp_err_string = (char *) e.message; + hw_bp_err_string = e.message; } } else @@ -2543,7 +2543,7 @@ insert_bp_location (struct bp_location *bl, if (e.reason < 0) { val = 1; - hw_bp_err_string = (char *) e.message; + hw_bp_err_string = e.message; } } else