aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.cc
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers@google.com>2008-08-21 00:30:13 +0000
committerCraig Silverstein <csilvers@google.com>2008-08-21 00:30:13 +0000
commit1e52a9c18720a7b3e9c0c53ca2ac228a9d3d1508 (patch)
tree4dd1051e0f21f68ab0bb852de7c3d58e88d41202 /gold/fileread.cc
parent655e8529748cf0ed530e3042a22062a39c1e968a (diff)
downloadgdb-1e52a9c18720a7b3e9c0c53ca2ac228a9d3d1508.zip
gdb-1e52a9c18720a7b3e9c0c53ca2ac228a9d3d1508.tar.gz
gdb-1e52a9c18720a7b3e9c0c53ca2ac228a9d3d1508.tar.bz2
2008-08-20 Craig Silverstein <csilvers@google.com>
* fileread.cc (File_read::open): Do not lock the file unless it was successfully opened.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r--gold/fileread.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc
index e476194..8c2f8f3 100644
--- a/gold/fileread.cc
+++ b/gold/fileread.cc
@@ -121,9 +121,9 @@ File_read::open(const Task* task, const std::string& name)
this->size_ = s.st_size;
gold_debug(DEBUG_FILES, "Attempt to open %s succeeded",
this->name_.c_str());
- }
- this->token_.add_writer(task);
+ this->token_.add_writer(task);
+ }
return this->descriptor_ >= 0;
}