[05/15] Add a const

Message ID 1403014378-4349-6-git-send-email-gbenson@redhat.com
State Committed
Headers

Commit Message

Gary Benson June 17, 2014, 2:12 p.m. UTC
  This commit adds a const that was in i386-low.c but not in i386-nat.c.

gdb/
2014-06-17  Gary Benson  <gbenson@redhat.com>

	* i386-nat.c (i386_handle_nonaligned_watchpoint) <size_try_array>:
	Make const.
---
 gdb/ChangeLog  |    5 +++++
 gdb/i386-nat.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
  

Comments

Pedro Alves June 17, 2014, 3:46 p.m. UTC | #1
On 06/17/2014 03:12 PM, Gary Benson wrote:
> This commit adds a const that was in i386-low.c but not in i386-nat.c.
> 
> gdb/
> 2014-06-17  Gary Benson  <gbenson@redhat.com>
> 
> 	* i386-nat.c (i386_handle_nonaligned_watchpoint) <size_try_array>:
> 	Make const.

OK.
  

Patch

diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index a7742f2..23efb33 100644
--- a/gdb/i386-nat.c
+++ b/gdb/i386-nat.c
@@ -466,7 +466,7 @@  i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state,
   int retval = 0;
   int max_wp_len = TARGET_HAS_DR_LEN_8 ? 8 : 4;
 
-  static int size_try_array[8][8] =
+  static const int size_try_array[8][8] =
   {
     {1, 1, 1, 1, 1, 1, 1, 1},	/* Trying size one.  */
     {2, 1, 2, 1, 2, 1, 2, 1},	/* Trying size two.  */