aboutsummaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-10-29 07:13:23 +0000
committerSteve Chamberlain <steve@cygnus>1991-10-29 07:13:23 +0000
commit0885eef1294ce1593fc5a08dd6f21411d7f87bc7 (patch)
treedf1127d1042210fc831edb2d4b4f01503b82a96e /binutils/ar.c
parent5f0e876707b85f4a1155a0424f8a33d6fb78302b (diff)
downloadgdb-0885eef1294ce1593fc5a08dd6f21411d7f87bc7.zip
gdb-0885eef1294ce1593fc5a08dd6f21411d7f87bc7.tar.gz
gdb-0885eef1294ce1593fc5a08dd6f21411d7f87bc7.tar.bz2
Don't care about an unlink failure
Diffstat (limited to 'binutils/ar.c')
-rw-r--r--binutils/ar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index f37713e..4a504327 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -692,8 +692,11 @@ write_archive()
if (!bfd_close(obfd))
bfd_fatal(inarch->filename);
- if (unlink(inarch->filename) != 0)
- bfd_fatal(inarch->filename);
+
+ /* We don't care if this fails, we might be creating the
+ archive */
+ (void) unlink(inarch->filename);
+
if (rename(new_name, inarch->filename) != 0)
bfd_fatal(inarch->filename);
#if 0