diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-11-12 20:26:05 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-11-12 20:26:05 +0000 |
commit | 82c0260ec6f9752dbfdf30154e0eeca706f0d5bd (patch) | |
tree | ca37ee219b06827aa6bfa68e1b13562b0fae1d72 /gdb | |
parent | 70d358198ff91ea7401b66393952d28a6d7c2466 (diff) | |
download | gdb-82c0260ec6f9752dbfdf30154e0eeca706f0d5bd.zip gdb-82c0260ec6f9752dbfdf30154e0eeca706f0d5bd.tar.gz gdb-82c0260ec6f9752dbfdf30154e0eeca706f0d5bd.tar.bz2 |
2002-11-12 Andrew Cagney <ac131313@redhat.com>
* utils.c (gdb_realpath): Make rp a constant pointer.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/utils.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 55a1134..2299e64 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2002-11-12 Andrew Cagney <ac131313@redhat.com> + * utils.c (gdb_realpath): Make rp a constant pointer. + +2002-11-12 Andrew Cagney <ac131313@redhat.com> + * utils.c (gdb_realpath): Rewrite. Try, in order: realpath() with a constant buffer; cannonicalize_file_name(); realpath() with a pathconf() defined buffer, xstrdup(). diff --git a/gdb/utils.c b/gdb/utils.c index b2a1d18..62e4020 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2718,7 +2718,7 @@ gdb_realpath (const char *filename) # define USE_REALPATH # endif # if defined (USE_REALPATH) - char *rp = realpath (filename, buf); + const char *rp = realpath (filename, buf); if (rp == NULL) rp = filename; return xstrdup (rp); |