From 892c29e2d3991da928f409fa2998a7c8c61eb4df Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Mon, 6 Nov 2023 11:34:37 -0800 Subject: [PATCH] Run clang-format on client source Signed-off-by: Derek G Foster --- clients/gnmi-ctl/gnmi_ctl_utils.c | 4 +++- clients/gnmi-ctl/gnmi_ctl_utils.h | 3 ++- clients/p4rt_perf_test/p4rt_perf_simple_l2_demo.h | 4 ++-- clients/sgnmi_cli/sgnmi_cli.cc | 7 +++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/clients/gnmi-ctl/gnmi_ctl_utils.c b/clients/gnmi-ctl/gnmi_ctl_utils.c index 688f90cd..c7965f29 100644 --- a/clients/gnmi-ctl/gnmi_ctl_utils.c +++ b/clients/gnmi-ctl/gnmi_ctl_utils.c @@ -1,7 +1,9 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc. + * Copyright (c) 2008-2016 Nicira, Inc. * Copyright (c) 2022-2023 Intel Corporation. * + * SPDX-License-Identifier: Apache-2.0 + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: diff --git a/clients/gnmi-ctl/gnmi_ctl_utils.h b/clients/gnmi-ctl/gnmi_ctl_utils.h index ee820550..19d46091 100644 --- a/clients/gnmi-ctl/gnmi_ctl_utils.h +++ b/clients/gnmi-ctl/gnmi_ctl_utils.h @@ -1,6 +1,7 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Nicira, Inc. + * Copyright (c) 2008-2017 Nicira, Inc. * Copyright (c) 2022-2023 Intel Corporation. + * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/clients/p4rt_perf_test/p4rt_perf_simple_l2_demo.h b/clients/p4rt_perf_test/p4rt_perf_simple_l2_demo.h index 19a2f6b1..4d3a9165 100644 --- a/clients/p4rt_perf_test/p4rt_perf_simple_l2_demo.h +++ b/clients/p4rt_perf_test/p4rt_perf_simple_l2_demo.h @@ -14,7 +14,7 @@ void PrepareSimpleL2DemoTableEntry(p4::v1::TableEntry* table_entry, bool insert_entry); int SimpleL2DemoTest(P4rtSession* session, - const ::p4::config::v1::P4Info& p4info, - ThreadInfo& t_data); + const ::p4::config::v1::P4Info& p4info, + ThreadInfo& t_data); #endif diff --git a/clients/sgnmi_cli/sgnmi_cli.cc b/clients/sgnmi_cli/sgnmi_cli.cc index 8268987a..a7970a34 100644 --- a/clients/sgnmi_cli/sgnmi_cli.cc +++ b/clients/sgnmi_cli/sgnmi_cli.cc @@ -26,7 +26,7 @@ #define DEFAULT_CERTS_DIR "/usr/share/stratum/certs/" DEFINE_bool(grpc_use_insecure_mode, false, - "grpc communication in insecure mode"); + "grpc communication in insecure mode"); DEFINE_string(grpc_addr, stratum::kLocalStratumUrl, "gNMI server address"); DEFINE_string(bool_val, "", "Boolean value to be set"); DEFINE_string(int_val, "", "Integer value to be set (64-bit)"); @@ -243,7 +243,6 @@ ::gnmi::SubscribeRequest BuildGnmiSubSampleRequest(std::string path, } ::util::Status Main(int argc, char** argv) { - // Default certificate file location for TLS-mode FLAGS_ca_cert_file = DEFAULT_CERTS_DIR "ca.crt"; FLAGS_server_key_file = DEFAULT_CERTS_DIR "stratum.key"; @@ -288,13 +287,13 @@ ::util::Status Main(int argc, char** argv) { std::shared_ptr<::grpc::Channel> channel; if (FLAGS_grpc_use_insecure_mode) { ASSIGN_OR_RETURN(auto credentials_manager, - CredentialsManager::CreateInstance(true)); + CredentialsManager::CreateInstance(true)); channel = ::grpc::CreateChannel( FLAGS_grpc_addr, credentials_manager->GenerateExternalFacingClientCredentials()); } else { std::shared_ptr<::grpc::ChannelCredentials> channel_credentials = - ::grpc::InsecureChannelCredentials(); + ::grpc::InsecureChannelCredentials(); channel = ::grpc::CreateChannel(FLAGS_grpc_addr, channel_credentials); }