This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 4/5] constify gdb_fopen
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 25 Apr 2013 11:25:56 -0600
- Subject: [PATCH 4/5] constify gdb_fopen
A trivial patch to constify gdb_fopen.
* ui-file.c (gdb_fopen): Make arguments const.
* ui-file.h (gdb_fopen): Make arguments const.
---
gdb/ui-file.c | 2 +-
gdb/ui-file.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index 5671abd..cf5a86d 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -663,7 +663,7 @@ stdio_fileopen (FILE *file)
}
struct ui_file *
-gdb_fopen (char *name, char *mode)
+gdb_fopen (const char *name, const char *mode)
{
FILE *f = gdb_fopen_cloexec (name, mode);
diff --git a/gdb/ui-file.h b/gdb/ui-file.h
index 4196524..9fef68c 100644
--- a/gdb/ui-file.h
+++ b/gdb/ui-file.h
@@ -130,7 +130,7 @@ extern struct ui_file *mem_fileopen (void);
extern struct ui_file *stdio_fileopen (FILE *file);
/* Open NAME returning an STDIO based UI_FILE. */
-extern struct ui_file *gdb_fopen (char *name, char *mode);
+extern struct ui_file *gdb_fopen (const char *name, const char *mode);
/* Create a file which writes to both ONE and TWO. CLOSE_ONE
and CLOSE_TWO indicate whether the original files should be
--
1.8.1.4