logd: specify clang format
Switch _all_ file's coding style to match to ease all future changes.
SideEffects: None
Test: compile
Bug: 35373582
Change-Id: I470cb17f64fa48f14aafc02f574e296bffe3a3f3
diff --git a/logd/FlushCommand.cpp b/logd/FlushCommand.cpp
index 6a26d00..5a5c0d9 100644
--- a/logd/FlushCommand.cpp
+++ b/logd/FlushCommand.cpp
@@ -26,20 +26,16 @@
#include "LogTimes.h"
#include "LogUtils.h"
-FlushCommand::FlushCommand(LogReader &reader,
- bool nonBlock,
- unsigned long tail,
- unsigned int logMask,
- pid_t pid,
- uint64_t start,
- uint64_t timeout) :
- mReader(reader),
- mNonBlock(nonBlock),
- mTail(tail),
- mLogMask(logMask),
- mPid(pid),
- mStart(start),
- mTimeout((start > 1) ? timeout : 0) {
+FlushCommand::FlushCommand(LogReader& reader, bool nonBlock, unsigned long tail,
+ unsigned int logMask, pid_t pid, uint64_t start,
+ uint64_t timeout)
+ : mReader(reader),
+ mNonBlock(nonBlock),
+ mTail(tail),
+ mLogMask(logMask),
+ mPid(pid),
+ mStart(start),
+ mTimeout((start > 1) ? timeout : 0) {
}
// runSocketCommand is called once for every open client on the
@@ -51,13 +47,13 @@
// global LogTimeEntry::lock() is used to protect access,
// reference counts are used to ensure that individual
// LogTimeEntry lifetime is managed when not protected.
-void FlushCommand::runSocketCommand(SocketClient *client) {
- LogTimeEntry *entry = NULL;
- LastLogTimes × = mReader.logbuf().mTimes;
+void FlushCommand::runSocketCommand(SocketClient* client) {
+ LogTimeEntry* entry = NULL;
+ LastLogTimes& times = mReader.logbuf().mTimes;
LogTimeEntry::lock();
LastLogTimes::iterator it = times.begin();
- while(it != times.end()) {
+ while (it != times.end()) {
entry = (*it);
if (entry->mClient == client) {
if (entry->mTimeout.tv_sec || entry->mTimeout.tv_nsec) {
@@ -77,7 +73,7 @@
if (it == times.end()) {
// Create LogTimeEntry in notifyNewLog() ?
- if (mTail == (unsigned long) -1) {
+ if (mTail == (unsigned long)-1) {
LogTimeEntry::unlock();
return;
}
@@ -93,14 +89,14 @@
LogTimeEntry::unlock();
}
-bool FlushCommand::hasReadLogs(SocketClient *client) {
+bool FlushCommand::hasReadLogs(SocketClient* client) {
return clientHasLogCredentials(client);
}
-static bool clientHasSecurityCredentials(SocketClient *client) {
+static bool clientHasSecurityCredentials(SocketClient* client) {
return (client->getUid() == AID_SYSTEM) || (client->getGid() == AID_SYSTEM);
}
-bool FlushCommand::hasSecurityLogs(SocketClient *client) {
+bool FlushCommand::hasSecurityLogs(SocketClient* client) {
return clientHasSecurityCredentials(client);
}