Skip to content

Commit 24d6b84

Browse files
committed
fix(common): Added formatting fixes
1 parent 5a64f51 commit 24d6b84

File tree

29 files changed

+96
-94
lines changed

29 files changed

+96
-94
lines changed

common_components/linux_compat/freertos/include/freertos/FreeRTOS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ typedef void *EventGroupHandle_t;
2121
typedef uint32_t TickType_t;
2222
typedef TickType_t EventBits_t;
2323

24-
typedef void (*TaskFunction_t)( void * );
24+
typedef void (*TaskFunction_t)(void *);
2525
typedef unsigned int UBaseType_t;
2626
typedef int BaseType_t;
2727

components/eppp_link/examples/host/main/register_iperf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ static int ppp_cmd_iperf(int argc, char **argv)
139139
cfg.flag & IPERF_FLAG_TCP ? "tcp" : "udp",
140140
cfg.flag & IPERF_FLAG_SERVER ? "server" : "client",
141141
(uint16_t) cfg.source_ip4 & 0xFF,
142-
(uint16_t) (cfg.source_ip4 >> 8) & 0xFF,
143-
(uint16_t) (cfg.source_ip4 >> 16) & 0xFF,
144-
(uint16_t) (cfg.source_ip4 >> 24) & 0xFF,
142+
(uint16_t)(cfg.source_ip4 >> 8) & 0xFF,
143+
(uint16_t)(cfg.source_ip4 >> 16) & 0xFF,
144+
(uint16_t)(cfg.source_ip4 >> 24) & 0xFF,
145145
cfg.sport,
146146
cfg.destination_ip4 & 0xFF, (cfg.destination_ip4 >> 8) & 0xFF,
147147
(cfg.destination_ip4 >> 16) & 0xFF, (cfg.destination_ip4 >> 24) & 0xFF, cfg.dport,

components/esp_modem/examples/modem_console/main/console_helper.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class ConsoleCommand {
8080
* @param f Function callback for the command
8181
*/
8282
template<typename T> explicit ConsoleCommand(const char *command, const char *help, const T *arg_struct, size_t srg_struct_size,
83-
std::function<bool(ConsoleCommand *)> f): func(std::move(f))
83+
std::function<bool(ConsoleCommand *)> f): func(std::move(f))
8484
{
8585
size_t args_plain_size = srg_struct_size / sizeof(CommandArgs);
8686
auto first_arg = reinterpret_cast<const CommandArgs *>(arg_struct);

components/esp_modem/examples/modem_console/main/ping_handle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ static int do_ping_cmd(int argc, char **argv)
101101
return 1;
102102
}
103103
if (res->ai_family == AF_INET) {
104-
struct in_addr addr4 = ((struct sockaddr_in *) (res->ai_addr))->sin_addr;
104+
struct in_addr addr4 = ((struct sockaddr_in *)(res->ai_addr))->sin_addr;
105105
inet_addr_to_ip4addr(ip_2_ip4(&target_addr), &addr4);
106106
} else {
107-
struct in6_addr addr6 = ((struct sockaddr_in6 *) (res->ai_addr))->sin6_addr;
107+
struct in6_addr addr6 = ((struct sockaddr_in6 *)(res->ai_addr))->sin6_addr;
108108
inet6_addr_to_ip6addr(ip_2_ip6(&target_addr), &addr6);
109109
}
110110
freeaddrinfo(res);

components/esp_modem/examples/modem_tcp_client/main/sock_commands_sim7600.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ using namespace esp_modem;
1818

1919
command_result net_open(CommandableIf *term)
2020
{
21-
ESP_LOGV(TAG, "%s", __func__ );
21+
ESP_LOGV(TAG, "%s", __func__);
2222
std::string response;
2323
auto ret = dce_commands::generic_get_string(term, "AT+NETOPEN?\r", response, 1000);
2424
if (ret != command_result::OK) {
2525
return ret;
2626
}
27-
ESP_LOGV(TAG, "%s", response.data() );
27+
ESP_LOGV(TAG, "%s", response.data());
2828
if (response.find("+NETOPEN: 1") != std::string::npos) {
2929
ESP_LOGD(TAG, "Already there");
3030
ret = command_result::OK;
@@ -42,37 +42,37 @@ command_result net_open(CommandableIf *term)
4242

4343
command_result net_close(CommandableIf *term)
4444
{
45-
ESP_LOGV(TAG, "%s", __func__ );
45+
ESP_LOGV(TAG, "%s", __func__);
4646
return dce_commands::generic_command(term, "AT+NETCLOSE\r", "+NETCLOSE:", "ERROR", 30000);
4747
}
4848

4949
command_result tcp_open(CommandableIf *term, const std::string &host, int port, int timeout)
5050
{
51-
ESP_LOGV(TAG, "%s", __func__ );
51+
ESP_LOGV(TAG, "%s", __func__);
5252
auto ret = dce_commands::generic_command(term, "AT+CIPRXGET=1\r", "OK", "ERROR", 50000);
5353
if (ret != command_result::OK) {
5454
ESP_LOGE(TAG, "Setting Rx mode failed!");
5555
return ret;
5656
}
57-
ESP_LOGV(TAG, "%s", __func__ );
57+
ESP_LOGV(TAG, "%s", __func__);
5858
std::string ip_open = R"(AT+CIPOPEN=0,"TCP",")" + host + "\"," + std::to_string(port) + "\r";
5959
ret = dce_commands::generic_command(term, ip_open, "+CIPOPEN: 0,0", "ERROR", timeout);
6060
if (ret != command_result::OK) {
61-
ESP_LOGE(TAG, "%s Failed", __func__ );
61+
ESP_LOGE(TAG, "%s Failed", __func__);
6262
return ret;
6363
}
6464
return command_result::OK;
6565
}
6666

6767
command_result tcp_close(CommandableIf *term)
6868
{
69-
ESP_LOGV(TAG, "%s", __func__ );
69+
ESP_LOGV(TAG, "%s", __func__);
7070
return dce_commands::generic_command(term, "AT+CIPCLOSE=0\r", "+CIPCLOSE:", "ERROR", 10000);
7171
}
7272

7373
command_result tcp_send(CommandableIf *term, uint8_t *data, size_t len)
7474
{
75-
ESP_LOGV(TAG, "%s", __func__ );
75+
ESP_LOGV(TAG, "%s", __func__);
7676
std::string send = "AT+CIPSEND=0," + std::to_string(len) + "\r";
7777
auto ret = term->command(send, [&](uint8_t *data, size_t len) {
7878
std::string_view response((char *)data, len);
@@ -107,7 +107,7 @@ command_result tcp_send(CommandableIf *term, uint8_t *data, size_t len)
107107
uint8_t ctrl_z = '\x1A';
108108
term->write(&ctrl_z, 1);
109109
int count = 0;
110-
while (ret == command_result::TIMEOUT && count++ < 1000 ) {
110+
while (ret == command_result::TIMEOUT && count++ < 1000) {
111111
vTaskDelay(pdMS_TO_TICKS(1000));
112112
}
113113
term->on_read(nullptr);
@@ -116,7 +116,7 @@ command_result tcp_send(CommandableIf *term, uint8_t *data, size_t len)
116116

117117
command_result tcp_recv(CommandableIf *term, uint8_t *data, size_t len, size_t &out_len)
118118
{
119-
ESP_LOGV(TAG, "%s", __func__ );
119+
ESP_LOGV(TAG, "%s", __func__);
120120
std::string out;
121121
auto ret = dce_commands::generic_get_string(term, "AT+CIPRXGET=4,0\r", out);
122122
if (ret != command_result::OK) {

components/esp_modem/examples/simple_cmux_client/components/SIM7070_gnss/SIM7070_gnss.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ class LocalFactory: public Factory {
4343
* @return unique pointer of the resultant DCE
4444
*/
4545
std::unique_ptr<DCE_gnss> create_SIM7070_GNSS_dce(const esp_modem::dce_config *config,
46-
std::shared_ptr<esp_modem::DTE> dte,
47-
esp_netif_t *netif)
46+
std::shared_ptr<esp_modem::DTE> dte,
47+
esp_netif_t *netif)
4848
{
4949
return gnss_factory::LocalFactory::create(config, std::move(dte), netif);
5050
}
5151

5252
esp_modem::command_result get_gnss_information_sim70xx_lib(esp_modem::CommandableIf *t, sim70xx_gps_t &gps)
5353
{
5454

55-
ESP_LOGV(TAG, "%s", __func__ );
55+
ESP_LOGV(TAG, "%s", __func__);
5656
std::string str_out;
5757
auto ret = esp_modem::dce_commands::generic_get_string(t, "AT+CGNSINF\r", str_out);
5858
if (ret != esp_modem::command_result::OK) {

components/esp_modem/include/cxx_include/esp_modem_buffer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace esp_modem {
1414
*/
1515
struct unique_buffer {
1616
explicit unique_buffer(size_t size);
17-
unique_buffer (unique_buffer const &) = delete;
17+
unique_buffer(unique_buffer const &) = delete;
1818
unique_buffer &operator=(unique_buffer const &) = delete;
1919
unique_buffer(unique_buffer &&other) noexcept
2020
{

components/esp_modem/src/esp_modem_uart_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ constexpr const char *TAG = "uart_resource";
1717

1818
uart_resource::uart_resource(const esp_modem_uart_term_config *config, QueueHandle_t *event_queue, int fd): port(-1)
1919
{
20-
ESP_LOGD(TAG, "Creating uart resource" );
20+
ESP_LOGD(TAG, "Creating uart resource");
2121
struct termios tty = {};
2222
ESP_MODEM_THROW_IF_FALSE(tcgetattr(fd, &tty) == 0, "Failed to tcgetattr()");
2323

components/esp_modem/src/esp_modem_vfs_socket_creator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static esp_err_t hostname_to_fd(const char *host, int port, int *fd)
5252
auto *p = reinterpret_cast<struct sockaddr_in *>(address_info->ai_addr);
5353
p->sin_port = htons(port);
5454
ESP_LOGI(TAG, "[sock=%d] Resolved IPv4 address: %s", *fd, inet_ntoa(p->sin_addr));
55-
memcpy(&address, p, sizeof(struct sockaddr ));
55+
memcpy(&address, p, sizeof(struct sockaddr));
5656
} else {
5757
ESP_LOGE(TAG, "Unsupported protocol family %d", address_info->ai_family);
5858
close(*fd);

components/esp_modem/test/host_test/main/LoopbackTerm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int LoopbackTerm::write(uint8_t *data, size_t len)
2626
async_results.push_back(std::move(ret));
2727
return len;
2828
}
29-
if (len > 2 && (data[len - 1] == '\r' || data[len - 1] == '+') ) { // Simple AT responder
29+
if (len > 2 && (data[len - 1] == '\r' || data[len - 1] == '+')) { // Simple AT responder
3030
std::string command((char *)data, len);
3131
std::string response;
3232
if (command == "+++") {

0 commit comments

Comments
 (0)