summaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-09-08 09:53:43 -0600
committerTom Tromey <tom@tromey.com>2019-09-11 07:02:46 -0600
commit1ff5d5c46342727ad6728732e122f963fbb2268b (patch)
tree44aa813121fce09cde35afe2068b7c5ece838a0e /binutils/bucomm.c
parent0a4632b5637fa63ea4dc7651cdbae21e8b7005cd (diff)
downloadbinutils-gdb-1ff5d5c46342727ad6728732e122f963fbb2268b.tar.gz
Constify argument to make_tempname and make_tempdir
This constifies the argument to make_tempname and make_tempdir, removing some casts. I initially thought that this obsoleted the allocation in write_archive, but write_archive closes the BFD before using the name, so this appears not to be the case. binutils/ChangeLog 2019-09-11 Tom Tromey <tom@tromey.com> * objcopy.c (copy_archive): Update. * bucomm.h (make_tempname, make_tempdir): Make argument const. * bucomm.c (make_tempname, make_tempdir): Make argument const.
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 21adb05c418..e8ac3b6de85 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -532,7 +532,7 @@ template_in_dir (const char *path)
as FILENAME. */
char *
-make_tempname (char *filename)
+make_tempname (const char *filename)
{
char *tmpname = template_in_dir (filename);
int fd;
@@ -558,7 +558,7 @@ make_tempname (char *filename)
directory containing FILENAME. */
char *
-make_tempdir (char *filename)
+make_tempdir (const char *filename)
{
char *tmpname = template_in_dir (filename);