Fix formatting
Test: Local build
Change-Id: If78e57af0106a1cb7007b000280ec6c96b40f0d5
diff --git a/common/libs/fs/shared_fd.h b/common/libs/fs/shared_fd.h
index 79f5405..69542e6 100644
--- a/common/libs/fs/shared_fd.h
+++ b/common/libs/fs/shared_fd.h
@@ -232,16 +232,14 @@
int EpollCtl(int op, cvd::SharedFD new_fd, struct epoll_event* event) {
errno = 0;
- int rval = TEMP_FAILURE_RETRY(
- epoll_ctl(fd_, op, new_fd->fd_, event));
+ int rval = TEMP_FAILURE_RETRY(epoll_ctl(fd_, op, new_fd->fd_, event));
errno_ = errno;
return rval;
}
int EpollWait(struct epoll_event* events, int maxevents, int timeout) {
errno = 0;
- int rval = TEMP_FAILURE_RETRY(
- epoll_wait(fd_, events, maxevents, timeout));
+ int rval = TEMP_FAILURE_RETRY(epoll_wait(fd_, events, maxevents, timeout));
errno_ = errno;
return rval;
}
@@ -461,7 +459,7 @@
}
int TimerSet(int flags, const struct itimerspec* new_value,
- struct itimerspec* old_value) {
+ struct itimerspec* old_value) {
errno = 0;
int rval = timerfd_settime(fd_, flags, new_value, old_value);
errno_ = errno;
diff --git a/guest/frontend/vnc_server/vnc_client_connection.cpp b/guest/frontend/vnc_server/vnc_client_connection.cpp
index f6b4669..b551f64 100644
--- a/guest/frontend/vnc_server/vnc_client_connection.cpp
+++ b/guest/frontend/vnc_server/vnc_client_connection.cpp
@@ -15,9 +15,9 @@
*/
#include "vnc_client_connection.h"
-#include "vnc_utils.h"
-#include "tcp_socket.h"
#include "keysyms.h"
+#include "tcp_socket.h"
+#include "vnc_utils.h"
#include <guest/libs/legacy_framebuffer/vsoc_framebuffer.h>
@@ -43,9 +43,9 @@
#include <cutils/sockets.h>
using cvd::vnc::Message;
-using cvd::vnc::VncClientConnection;
using cvd::vnc::Stripe;
using cvd::vnc::StripePtrVec;
+using cvd::vnc::VncClientConnection;
namespace {
class BigEndianChecker {
@@ -54,9 +54,7 @@
uint32_t u = 1;
is_big_endian_ = *reinterpret_cast<const char*>(&u) == 0;
}
- bool operator()() const {
- return is_big_endian_;
- }
+ bool operator()() const { return is_big_endian_; }
private:
bool is_big_endian_{};
@@ -117,9 +115,7 @@
return m;
}
-std::string HostName() {
- return "Cuttlefish";
-}
+std::string HostName() { return "Cuttlefish"; }
std::uint16_t uint16_tAt(const void* p) {
std::uint16_t u{};
@@ -156,7 +152,7 @@
return (pixel >> VSoCFrameBuffer::kGreenShift) &
((0x1 << VSoCFrameBuffer::kGreenBits) - 1);
}
-}
+} // namespace
namespace cvd {
namespace vnc {
bool operator==(const VncClientConnection::FrameBufferUpdateRequest& lhs,
@@ -170,14 +166,12 @@
return !(lhs == rhs);
}
} // namespace vnc
-} // namespace cvd // namespace
+} // namespace cvd
VncClientConnection::VncClientConnection(ClientSocket client,
VirtualInputs* virtual_inputs,
BlackBoard* bb, bool aggressive)
- : client_{std::move(client)},
- virtual_inputs_{virtual_inputs},
- bb_{bb} {
+ : client_{std::move(client)}, virtual_inputs_{virtual_inputs}, bb_{bb} {
frame_buffer_request_handler_tid_ = std::thread(
&VncClientConnection::FrameBufferUpdateRequestHandler, this, aggressive);
}
diff --git a/host/frontend/vnc_server/vnc_client_connection.cpp b/host/frontend/vnc_server/vnc_client_connection.cpp
index c9a87c8..8f44a97 100644
--- a/host/frontend/vnc_server/vnc_client_connection.cpp
+++ b/host/frontend/vnc_server/vnc_client_connection.cpp
@@ -44,10 +44,9 @@
DEFINE_bool(debug_client, false, "Turn on detailed logging for the client");
-#define DLOG(LEVEL) \
+#define DLOG(LEVEL) \
if (FLAGS_debug_client) LOG(LEVEL)
-
namespace {
class BigEndianChecker {
public:
diff --git a/host/libs/config/guest_config.cpp b/host/libs/config/guest_config.cpp
index 359cb24..6cd1528 100644
--- a/host/libs/config/guest_config.cpp
+++ b/host/libs/config/guest_config.cpp
@@ -18,8 +18,8 @@
#include <iomanip>
#include <sstream>
-#include <glog/logging.h>
#include <gflags/gflags.h>
+#include <glog/logging.h>
#include "host/libs/config/host_config.h"
std::string g_default_libvirt_domain{vsoc::GetPerInstanceDefault("cvd-")};
diff --git a/host/libs/config/guest_config.h b/host/libs/config/guest_config.h
index 462ed6c..eaf8ff6 100644
--- a/host/libs/config/guest_config.h
+++ b/host/libs/config/guest_config.h
@@ -135,20 +135,16 @@
// GetUSBSocketName returns name of the USB socket that will be used to
// forward access to USB gadget. This is for V1 of the USB bus.
- std::string GetUSBV1SocketName() const {
- return usb_v1_socket_name_;
- }
+ std::string GetUSBV1SocketName() const { return usb_v1_socket_name_; }
GuestConfig& SetUSBV1SocketName(const std::string& source) {
usb_v1_socket_name_ = source;
return *this;
}
- std::string GetKernelLogSocketName() const {
- return kernel_log_socket_name_;
- }
+ std::string GetKernelLogSocketName() const { return kernel_log_socket_name_; }
- GuestConfig& SetKernelLogSocketName( const std::string& source) {
+ GuestConfig& SetKernelLogSocketName(const std::string& source) {
kernel_log_socket_name_ = source;
return *this;
}
diff --git a/host/libs/ivserver/hald_client_test.cc b/host/libs/ivserver/hald_client_test.cc
index c566079..434f153 100644
--- a/host/libs/ivserver/hald_client_test.cc
+++ b/host/libs/ivserver/hald_client_test.cc
@@ -26,11 +26,11 @@
#include "host/libs/ivserver/hald_client.h"
#include "host/libs/ivserver/vsocsharedmem_mock.h"
+using ::testing::_;
using ::testing::DoAll;
using ::testing::Return;
using ::testing::ReturnRef;
using ::testing::SetArgPointee;
-using ::testing::_;
namespace ivserver {
namespace test {