Fix problem found with host bionic fortify checks

hardware/interfaces/bluetooth/1.0/default/test/bluetooth_address_test.cc:59:39:
error: 'open' called with O_CREAT or O_TMPFILE, but missing mode

Bug: 31559095
Test: out/host/linux-x86/nativetest{,64}/bluetooth-address-unit-tests/bluetooth-address-unit-tests
Change-Id: I913c78e25eccaecf8830f1caf8e92f834ab8bb76
This commit is contained in:
Dan Willemsen
2017-09-26 23:22:45 -07:00
parent ac03dfa789
commit dc1921810e

View File

@@ -56,7 +56,7 @@ class BluetoothAddressTest : public ::testing::Test {
void BluetoothAddressTest::FileWriteString(const char* path,
const char* string) {
int fd = open(path, O_CREAT | O_RDWR);
int fd = open(path, O_CREAT | O_RDWR, 0600);
EXPECT_TRUE(fd > 0) << "err = " << strerror(errno);
size_t length = strlen(string);