aboutsummaryrefslogtreecommitdiff
path: root/src/common/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/tests')
-rw-r--r--src/common/tests/file_utils.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/tests/file_utils.cc b/src/common/tests/file_utils.cc
index 80a6b650..1c041777 100644
--- a/src/common/tests/file_utils.cc
+++ b/src/common/tests/file_utils.cc
@@ -51,7 +51,7 @@ bool CopyFile(const char* from_path, const char* to_path) {
int outfile = HANDLE_EINTR(creat(to_path, 0666));
if (outfile < 0) {
perror("creat");
- if (HANDLE_EINTR(close(infile)) < 0) {
+ if (IGNORE_EINTR(close(infile)) < 0) {
perror("close");
}
return false;
@@ -84,11 +84,11 @@ bool CopyFile(const char* from_path, const char* to_path) {
} while (bytes_written_per_read < bytes_read);
}
- if (HANDLE_EINTR(close(infile)) == -1) {
+ if (IGNORE_EINTR(close(infile)) == -1) {
perror("close");
result = false;
}
- if (HANDLE_EINTR(close(outfile)) == -1) {
+ if (IGNORE_EINTR(close(outfile)) == -1) {
perror("close");
result = false;
}
@@ -112,7 +112,7 @@ bool ReadFile(const char* path, void* buffer, ssize_t* buffer_size) {
ok = false;
}
}
- if (HANDLE_EINTR(close(fd)) == -1) {
+ if (IGNORE_EINTR(close(fd)) == -1) {
perror("close");
ok = false;
}
@@ -143,7 +143,7 @@ bool WriteFile(const char* path, const void* buffer, size_t buffer_size) {
bytes_written_total += bytes_written_partial;
}
}
- if (HANDLE_EINTR(close(fd)) == -1) {
+ if (IGNORE_EINTR(close(fd)) == -1) {
perror("close");
ok = false;
}