[binutils-gdb] constify tui/tui-io.c

Yao Qi qiyao@sourceware.org
Fri Mar 20 17:43:00 GMT 2015


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cd46431bbd2f1dd90fbedee9a3bdbff705238c1b

commit cd46431bbd2f1dd90fbedee9a3bdbff705238c1b
Author: Pedro Alves <palves@redhat.com>
Date:   Mon Mar 9 11:58:20 2015 +0000

    constify tui/tui-io.c
    
    gdb:
    
    2015-03-20  Pedro Alves  <palves@redhat.com>
    
    	* tui/tui-io.c (tui_expand_tabs): Make "s1" const.

Diff:
---
 gdb/ChangeLog    | 4 ++++
 gdb/tui/tui-io.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c1d19a8..f0abc87 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2015-03-20  Pedro Alves  <palves@redhat.com>
 
+	* tui/tui-io.c (tui_expand_tabs): Make "s1" const.
+
+2015-03-20  Pedro Alves  <palves@redhat.com>
+
 	* xcoffread.c (scan_xcoff_symtab): Make "p" and "q" const.
 
 2015-03-20  Pedro Alves  <palves@redhat.com>
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index a8af9b6..c8b8567 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -692,7 +692,7 @@ tui_expand_tabs (const char *string, int col)
   /* 2. Copy the original string while replacing TABs with spaces.  */
   for (s = string; s; )
     {
-      char *s1 = strpbrk (s, "\t");
+      const char *s1 = strpbrk (s, "\t");
       if (s1)
 	{
 	  if (s1 > s)



More information about the Gdb-cvs mailing list