]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
breakpoint.c:insert_bp_location: Constify local.
authorPedro Alves <palves@redhat.com>
Thu, 12 Dec 2013 10:44:42 +0000 (10:44 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 12 Dec 2013 10:44:42 +0000 (10:44 +0000)
gdb/
2013-12-12  Pedro Alves  <palves@redhat.com>

* breakpoint.c (insert_bp_location): Make 'hw_bp_err_string' local
const, and remove casts.

gdb/ChangeLog
gdb/breakpoint.c

index 637a462b6f4bfa2ee7f157be8045675094a0b86d..c49895b7b50af4ba135e86d58617df5b76d0ffa5 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-12  Pedro Alves  <palves@redhat.com>
+
+       * breakpoint.c (insert_bp_location): Make 'hw_bp_err_string' local
+       const, and remove casts.
+
 2013-12-12  Pedro Alves  <palves@redhat.com>
 
        * cli/cli-cmds.c (source_script_from_stream) Use have_python
index 111660fce1a090fec4a50628f2e83cab4d11adae..589aa19b5c7834a025e3aedb427bad8cc6291567 100644 (file)
@@ -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