Fix a bug in StorageManager.
Test: Ran statsd and statsd_test. Change-Id: I2390c6d2c493981177b08d3861d7bee621253af3
This commit is contained in:
@@ -40,7 +40,7 @@ using std::unique_ptr;
|
||||
|
||||
void StorageManager::writeFile(const char* file, const void* buffer, int numBytes) {
|
||||
int fd = open(file, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
|
||||
if (fd != -1) {
|
||||
if (fd == -1) {
|
||||
VLOG("Attempt to access %s but failed", file);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user