summaryrefslogtreecommitdiff
path: root/adb/adb_utils_test.cpp
diff options
context:
space:
mode:
authorIan Kasprzak <iankaz@google.com>2019-04-25 15:59:28 +0000
committerIan Kasprzak <iankaz@google.com>2019-04-25 15:59:28 +0000
commit2c58e1924a7bf1b44049764fddb40c1704dc288f (patch)
treeac108140764b894ac24b6dceba42f7061fd6424f /adb/adb_utils_test.cpp
parent93d63c010ae24ff58acb70216bfcb93e3c73019a (diff)
Revert "Add a way to turn off unique_fd's operator int."
This reverts commit 93d63c010ae24ff58acb70216bfcb93e3c73019a. Reason for revert: b/131312539 - All aosp-master-with-phones phones failing boot / health check. Change-Id: Id4239f93484b7d6b8d9bcd355a59cbd40d9766e2
Diffstat (limited to 'adb/adb_utils_test.cpp')
-rw-r--r--adb/adb_utils_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/adb_utils_test.cpp b/adb/adb_utils_test.cpp
index cdca3aa321..bd676c2deb 100644
--- a/adb/adb_utils_test.cpp
+++ b/adb/adb_utils_test.cpp
@@ -149,13 +149,13 @@ TEST(adb_utils, mkdirs) {
TEST(adb_utils, set_file_block_mode) {
unique_fd fd(adb_open("/dev/null", O_RDWR | O_APPEND));
ASSERT_GE(fd, 0);
- int flags = fcntl(fd.get(), F_GETFL, 0);
+ int flags = fcntl(fd, F_GETFL, 0);
ASSERT_EQ(O_RDWR | O_APPEND, (flags & (O_RDWR | O_APPEND)));
ASSERT_TRUE(set_file_block_mode(fd, false));
- int new_flags = fcntl(fd.get(), F_GETFL, 0);
+ int new_flags = fcntl(fd, F_GETFL, 0);
ASSERT_EQ(flags | O_NONBLOCK, new_flags);
ASSERT_TRUE(set_file_block_mode(fd, true));
- new_flags = fcntl(fd.get(), F_GETFL, 0);
+ new_flags = fcntl(fd, F_GETFL, 0);
ASSERT_EQ(flags, new_flags);
}
#endif