[libsanitizer] Fix OpenFile() usage in TSan and DFSan.

This is a follow-up for r232936.

llvm-svn: 232937
This commit is contained in:
Alexander Potapenko 2015-03-23 10:32:28 +00:00
parent 141e420a81
commit b9c928bd10
2 changed files with 2 additions and 2 deletions

View File

@ -333,7 +333,7 @@ static void InitializeFlags() {
static void dfsan_fini() {
if (internal_strcmp(flags().dump_labels_at_exit, "") != 0) {
fd_t fd = OpenFile(flags().dump_labels_at_exit, true /* write */);
fd_t fd = OpenFile(flags().dump_labels_at_exit, WrOnly);
if (fd == kInvalidFd) {
Report("WARNING: DataFlowSanitizer: unable to open output file %s\n",
flags().dump_labels_at_exit);

View File

@ -153,7 +153,7 @@ static void BackgroundThread(void *arg) {
} else {
InternalScopedString filename(kMaxPathLength);
filename.append("%s.%d", flags()->profile_memory, (int)internal_getpid());
uptr openrv = OpenFile(filename.data(), true);
uptr openrv = OpenFile(filename.data(), WrOnly);
if (internal_iserror(openrv)) {
Printf("ThreadSanitizer: failed to open memory profile file '%s'\n",
&filename[0]);