Skip to content

Commit 6f9f4e7

Browse files
committed
Enable clang-format for common/libs/transport
Assisted-by: Gemini:Next Bug: b/512215781 TAG=agy CONV=7aca3351-9aca-4ef1-a4e3-10e50737d7b2
1 parent ecba083 commit 6f9f4e7

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

base/cvd/cuttlefish/common/libs/transport/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ cf_cc_library(
1414
"channel.h",
1515
"channel_sharedfd.h",
1616
],
17+
clang_format_enabled = True,
1718
deps = [
1819
"//cuttlefish/common/libs/fs",
1920
"//cuttlefish/result",

base/cvd/cuttlefish/common/libs/transport/channel.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ void MessageDestroyer::operator()(RawMessage* ptr) {
2828
* Allocates memory for a RawMessage carrying a message of size
2929
* `payload_size`.
3030
*/
31-
Result<ManagedMessage> CreateMessage(uint32_t command, bool is_response, size_t payload_size) {
31+
Result<ManagedMessage> CreateMessage(uint32_t command, bool is_response,
32+
size_t payload_size) {
3233
const auto bytes_to_allocate = sizeof(RawMessage) + payload_size;
3334
auto memory = std::malloc(bytes_to_allocate);
34-
CF_EXPECT(memory != nullptr,
35-
"Cannot allocate " << bytes_to_allocate << " bytes for secure_env RPC message");
35+
CF_EXPECT(memory != nullptr, "Cannot allocate "
36+
<< bytes_to_allocate
37+
<< " bytes for secure_env RPC message");
3638
auto message = reinterpret_cast<RawMessage*>(memory);
3739
message->command = command;
3840
message->is_response = is_response;

0 commit comments

Comments
 (0)