summaryrefslogtreecommitdiffstats
path: root/tests/unistd_test.cpp
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-06-01 11:28:31 -0700
committerDan Albert <danalbert@google.com>2015-06-01 13:24:36 -0700
commitc5e02eeb353c3cdd357413f563701d5018fc76a5 (patch)
treeb59637eebc2fb12c42ecfec5054ec3e1f4d7d91b /tests/unistd_test.cpp
parent5f3e19dbbeb851fff5cf7f9869d344feca479413 (diff)
downloadbionic-c5e02eeb353c3cdd357413f563701d5018fc76a5.zip
bionic-c5e02eeb353c3cdd357413f563701d5018fc76a5.tar.gz
bionic-c5e02eeb353c3cdd357413f563701d5018fc76a5.tar.bz2
Cleanup ftruncate negative test.
Addresses post-submit comments from I54692ab8105dd09db6af7a2c0894a17bdd118aa0. Bug: http://b/21309901 Change-Id: Ie19ee8cdcc4055a65fe7dfc103156e54eafe8977 (cherry picked from commit 9d476a02e9a14e847669a6683c585028175aa322)
Diffstat (limited to 'tests/unistd_test.cpp')
-rw-r--r--tests/unistd_test.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/unistd_test.cpp b/tests/unistd_test.cpp
index a21578a..79c16d7 100644
--- a/tests/unistd_test.cpp
+++ b/tests/unistd_test.cpp
@@ -179,10 +179,8 @@ TEST(unistd, ftruncate64) {
TEST(unistd, ftruncate_negative) {
TemporaryFile tf;
errno = 0;
- int rc = ftruncate(tf.fd, -123);
- int err = errno;
- ASSERT_EQ(-1, rc);
- ASSERT_EQ(EINVAL, err);
+ ASSERT_EQ(-1, ftruncate(tf.fd, -123));
+ ASSERT_EQ(EINVAL, errno);
}
static bool g_pause_test_flag = false;