summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-05-23 16:04:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-23 16:04:00 +0000
commit4b7ddd6105c44b01b473c5ed1035b6be34ba19e2 (patch)
tree2f0f145e4a5daaa0c82542bc281e9c155c87a532
parent91cf41cf43847930a8e55b3789d4943a8e22f73a (diff)
parent12c67f4dfe1daf975e4c3f04211008b470206526 (diff)
downloadcore-4b7ddd6105c44b01b473c5ed1035b6be34ba19e2.tar.gz
core-4b7ddd6105c44b01b473c5ed1035b6be34ba19e2.tar.bz2
core-4b7ddd6105c44b01b473c5ed1035b6be34ba19e2.zip
Merge "Don't use TEMP_FAILURE_RETRY on close()" into mnc-dev
-rw-r--r--base/file.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/file.cpp b/base/file.cpp
index 6b19818e0..9a340b7f8 100644
--- a/base/file.cpp
+++ b/base/file.cpp
@@ -51,7 +51,7 @@ bool ReadFileToString(const std::string& path, std::string* content) {
return false;
}
bool result = ReadFdToString(fd, content);
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
return result;
}
@@ -102,7 +102,7 @@ bool WriteStringToFile(const std::string& content, const std::string& path,
ALOGE("android::WriteStringToFile write failed: %s", strerror(errno));
return CleanUpAfterFailedWrite(path);
}
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
return true;
}
#endif
@@ -116,7 +116,7 @@ bool WriteStringToFile(const std::string& content, const std::string& path) {
}
bool result = WriteStringToFd(content, fd);
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
return result || CleanUpAfterFailedWrite(path);
}