From 2cb3a6e35ef14d6c97ef2d096698865dd4869740 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 10 Nov 2020 18:40:01 +1100 Subject: [PATCH] Whitespace: Automated whitespace fixes (large commit) Apply the pre-commit hook whitespace fixes to all files in the repo. (Line endings, blank lines at end of file, trailing whitespace) * Original commit: espressif/esp-idf@66fb5a29bbdc2482d67c52e6f66b303378c9b789 --- components/mdns/CMakeLists.txt | 1 - components/mdns/mdns_console.c | 1 - components/mdns/mdns_networking.c | 2 +- components/mdns/test/CMakeLists.txt | 2 +- components/mdns/test/component.mk | 2 +- components/mdns/test/test_mdns.c | 2 +- components/mdns/test_afl_fuzz_host/CMakeLists.txt | 1 - components/mdns/test_afl_fuzz_host/Makefile | 2 +- .../mdns/test_afl_fuzz_host/esp_netif_loopback_mock.c | 4 ++-- components/mdns/test_afl_fuzz_host/input_packets.txt | 6 +++--- components/mdns/test_afl_fuzz_host/mdns_di.h | 4 ++-- components/mdns/test_afl_fuzz_host/test.c | 6 +++--- .../protocol_examples_common/addr_from_stdin.c | 2 +- .../protocol_examples_common/include/addr_from_stdin.h | 2 +- examples/protocols/mdns/Makefile | 1 - examples/protocols/mdns/main/CMakeLists.txt | 2 +- examples/protocols/mdns/main/mdns_example_main.c | 2 +- examples/protocols/mdns/sdkconfig.ci | 2 +- 18 files changed, 20 insertions(+), 24 deletions(-) diff --git a/components/mdns/CMakeLists.txt b/components/mdns/CMakeLists.txt index cd85cc88f..a8d2cedb3 100644 --- a/components/mdns/CMakeLists.txt +++ b/components/mdns/CMakeLists.txt @@ -5,4 +5,3 @@ idf_component_register(SRCS "mdns.c" PRIV_INCLUDE_DIRS "private_include" REQUIRES lwip console esp_netif PRIV_REQUIRES esp_timer) - diff --git a/components/mdns/mdns_console.c b/components/mdns/mdns_console.c index 2c36a6aee..3c36c05a5 100644 --- a/components/mdns/mdns_console.c +++ b/components/mdns/mdns_console.c @@ -1057,4 +1057,3 @@ void mdns_console_register(void) register_mdns_query_ip(); register_mdns_query_svc(); } - diff --git a/components/mdns/mdns_networking.c b/components/mdns/mdns_networking.c index 5f900cf4d..5b0f1e7b2 100644 --- a/components/mdns/mdns_networking.c +++ b/components/mdns/mdns_networking.c @@ -1,7 +1,7 @@ /* * MDNS Server Networking - * + * */ #include #include "mdns_networking.h" diff --git a/components/mdns/test/CMakeLists.txt b/components/mdns/test/CMakeLists.txt index a24aa2433..5994c440c 100644 --- a/components/mdns/test/CMakeLists.txt +++ b/components/mdns/test/CMakeLists.txt @@ -1,2 +1,2 @@ idf_component_register(SRC_DIRS "." - PRIV_REQUIRES cmock test_utils mdns) \ No newline at end of file + PRIV_REQUIRES cmock test_utils mdns) diff --git a/components/mdns/test/component.mk b/components/mdns/test/component.mk index 5be873488..8c6eb513e 100644 --- a/components/mdns/test/component.mk +++ b/components/mdns/test/component.mk @@ -1,4 +1,4 @@ # #Component Makefile # -COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive \ No newline at end of file +COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive diff --git a/components/mdns/test/test_mdns.c b/components/mdns/test/test_mdns.c index 9e1e50dc4..9dc9fe090 100644 --- a/components/mdns/test/test_mdns.c +++ b/components/mdns/test/test_mdns.c @@ -96,4 +96,4 @@ TEST_CASE("mdns query api return expected err-code and do not leak memory", "[le mdns_free(); esp_event_loop_delete_default(); -} \ No newline at end of file +} diff --git a/components/mdns/test_afl_fuzz_host/CMakeLists.txt b/components/mdns/test_afl_fuzz_host/CMakeLists.txt index 453dbc3dd..d65845194 100644 --- a/components/mdns/test_afl_fuzz_host/CMakeLists.txt +++ b/components/mdns/test_afl_fuzz_host/CMakeLists.txt @@ -5,4 +5,3 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(fuzz_test_update) - diff --git a/components/mdns/test_afl_fuzz_host/Makefile b/components/mdns/test_afl_fuzz_host/Makefile index 7f84a6f86..147bd1c05 100644 --- a/components/mdns/test_afl_fuzz_host/Makefile +++ b/components/mdns/test_afl_fuzz_host/Makefile @@ -36,7 +36,7 @@ CFLAGS=-g -Wno-unused-value -Wno-missing-declarations -Wno-pointer-bool-conversi -I$(COMPONENTS_DIR)/tcpip_adapter/include \ -I$(COMPONENTS_DIR)/xtensa/include \ -I$(COMPONENTS_DIR)/xtensa/esp32/include \ - -I$(COMPILER_ICLUDE_DIR)/include + -I$(COMPILER_ICLUDE_DIR)/include MDNS_C_DEPENDENCY_INJECTION=-include mdns_di.h diff --git a/components/mdns/test_afl_fuzz_host/esp_netif_loopback_mock.c b/components/mdns/test_afl_fuzz_host/esp_netif_loopback_mock.c index 2d52c15a0..ba7bbccb3 100644 --- a/components/mdns/test_afl_fuzz_host/esp_netif_loopback_mock.c +++ b/components/mdns/test_afl_fuzz_host/esp_netif_loopback_mock.c @@ -30,6 +30,6 @@ const char *esp_netif_get_ifkey(esp_netif_t *esp_netif) } esp_err_t esp_netif_get_ip6_linklocal(esp_netif_t *esp_netif, esp_ip6_addr_t *if_ip6) -{ +{ return ESP_ERR_NOT_SUPPORTED; -} +} diff --git a/components/mdns/test_afl_fuzz_host/input_packets.txt b/components/mdns/test_afl_fuzz_host/input_packets.txt index 6156ffa23..15c5df2ba 100644 --- a/components/mdns/test_afl_fuzz_host/input_packets.txt +++ b/components/mdns/test_afl_fuzz_host/input_packets.txt @@ -76,7 +76,7 @@ Packet Length: 262 Answers: 2 + 6 A: Hristo’s Mac mini._device-info._tcp.local. TXT IN 4500 [28] model=Macmini6,2; osxvers=16 A: _smb._tcp.local. PTR IN 4500 [22] Hristo’s Mac mini._smb._tcp.local. - A: Hristo’s Mac mini._smb._tcp.local. TXT IN FLUSH 4500 [1] + A: Hristo’s Mac mini._smb._tcp.local. TXT IN FLUSH 4500 [1] A: Hristo’s Mac mini._smb._tcp.local. SRV IN FLUSH 120 [18] 445 minifritz.local. A: minifritz.local. AAAA IN FLUSH 120 [16] fe80:0000:0000:0000:142e:54ff:b8c4:fd09 A: minifritz.local. A IN FLUSH 120 [4] 192.168.254.16 @@ -97,7 +97,7 @@ Packet Length: 269 Answers: 2 + 6 A: Hristo’s Mac mini._device-info._tcp.local. TXT IN 4500 [28] model=Macmini6,2; osxvers=16 A: _afpovertcp._tcp.local. PTR IN 4500 [22] Hristo’s Mac mini._afpovertcp._tcp.local. - A: Hristo’s Mac mini._afpovertcp._tcp.local. TXT IN FLUSH 4500 [1] + A: Hristo’s Mac mini._afpovertcp._tcp.local. TXT IN FLUSH 4500 [1] A: Hristo’s Mac mini._afpovertcp._tcp.local. SRV IN FLUSH 120 [18] 548 minifritz.local. A: minifritz.local. AAAA IN FLUSH 120 [16] fe80:0000:0000:0000:142e:54ff:b8c4:fd09 A: minifritz.local. A IN FLUSH 120 [4] 192.168.254.16 @@ -135,7 +135,7 @@ Packet Length: 279 Answers: 2 + 6 A: Sofiya Ivanova’s MacBook._device-info._tcp.local. TXT IN 4500 [17] model=Macmini2,1 A: _rfb._tcp.local. PTR IN 4500 [29] Sofiya Ivanova’s MacBook._rfb._tcp.local. - A: Sofiya Ivanova’s MacBook._rfb._tcp.local. TXT IN FLUSH 4500 [1] + A: Sofiya Ivanova’s MacBook._rfb._tcp.local. TXT IN FLUSH 4500 [1] A: Sofiya Ivanova’s MacBook._rfb._tcp.local. SRV IN FLUSH 120 [32] 5900 Sofiya-Ivanovas-MacBook.local. A: Sofiya-Ivanovas-MacBook.local. AAAA IN FLUSH 120 [16] fe80:0000:0000:0000:021c:b3ff:feb2:72a3 A: Sofiya-Ivanovas-MacBook.local. A IN FLUSH 120 [4] 192.168.254.20 diff --git a/components/mdns/test_afl_fuzz_host/mdns_di.h b/components/mdns/test_afl_fuzz_host/mdns_di.h index c3587c576..b4569dd59 100644 --- a/components/mdns/test_afl_fuzz_host/mdns_di.h +++ b/components/mdns/test_afl_fuzz_host/mdns_di.h @@ -1,6 +1,6 @@ /* * MDNS Dependecy injection -- preincluded to inject interface test functions into static variables - * + * */ #include "mdns.h" @@ -50,4 +50,4 @@ mdns_search_once_t * mdns_test_search_init(const char * name, const char * servi mdns_srv_item_t * mdns_test_mdns_get_service_item(const char * service, const char * proto) { return mdns_test_static_mdns_get_service_item(service, proto); -} \ No newline at end of file +} diff --git a/components/mdns/test_afl_fuzz_host/test.c b/components/mdns/test_afl_fuzz_host/test.c index a19b27125..0c123f6fa 100644 --- a/components/mdns/test_afl_fuzz_host/test.c +++ b/components/mdns/test_afl_fuzz_host/test.c @@ -124,7 +124,7 @@ int main(int argc, char** argv) }; const uint8_t mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0x00, 0x32}; - + uint8_t buf[1460]; char winstance[21+strlen(mdns_hostname)]; @@ -183,9 +183,9 @@ int main(int argc, char** argv) || mdns_test_service_add("_ptp", "_tcp", 885) || mdns_test_service_add("_sleep-proxy", "_udp", 885)) { - abort(); + abort(); } - + mdns_result_t * results = NULL; FILE *file; size_t nread; diff --git a/examples/common_components/protocol_examples_common/addr_from_stdin.c b/examples/common_components/protocol_examples_common/addr_from_stdin.c index 460fe9a2e..0320a27bf 100644 --- a/examples/common_components/protocol_examples_common/addr_from_stdin.c +++ b/examples/common_components/protocol_examples_common/addr_from_stdin.c @@ -62,4 +62,4 @@ esp_err_t get_addr_from_stdin(int port, int sock_type, int *ip_protocol, int *ad // no match found freeaddrinfo( addr_list ); return ESP_FAIL; -} \ No newline at end of file +} diff --git a/examples/common_components/protocol_examples_common/include/addr_from_stdin.h b/examples/common_components/protocol_examples_common/include/addr_from_stdin.h index ab5043aed..959a7ed09 100644 --- a/examples/common_components/protocol_examples_common/include/addr_from_stdin.h +++ b/examples/common_components/protocol_examples_common/include/addr_from_stdin.h @@ -41,4 +41,4 @@ esp_err_t get_addr_from_stdin(int port, int sock_type, #ifdef __cplusplus } -#endif \ No newline at end of file +#endif diff --git a/examples/protocols/mdns/Makefile b/examples/protocols/mdns/Makefile index 91a417c7c..5b69ef89c 100644 --- a/examples/protocols/mdns/Makefile +++ b/examples/protocols/mdns/Makefile @@ -8,4 +8,3 @@ PROJECT_NAME := mdns-test EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/common_components/protocol_examples_common include $(IDF_PATH)/make/project.mk - diff --git a/examples/protocols/mdns/main/CMakeLists.txt b/examples/protocols/mdns/main/CMakeLists.txt index 141d1e30d..eb0e6d9eb 100644 --- a/examples/protocols/mdns/main/CMakeLists.txt +++ b/examples/protocols/mdns/main/CMakeLists.txt @@ -1,2 +1,2 @@ idf_component_register(SRCS "mdns_example_main.c" - INCLUDE_DIRS ".") \ No newline at end of file + INCLUDE_DIRS ".") diff --git a/examples/protocols/mdns/main/mdns_example_main.c b/examples/protocols/mdns/main/mdns_example_main.c index 7d713c712..8f655fdad 100644 --- a/examples/protocols/mdns/main/mdns_example_main.c +++ b/examples/protocols/mdns/main/mdns_example_main.c @@ -256,4 +256,4 @@ static void query_mdns_host_with_getaddrinfo(char * host) } } } -#endif \ No newline at end of file +#endif diff --git a/examples/protocols/mdns/sdkconfig.ci b/examples/protocols/mdns/sdkconfig.ci index 60158c45c..42c55b8c0 100644 --- a/examples/protocols/mdns/sdkconfig.ci +++ b/examples/protocols/mdns/sdkconfig.ci @@ -1,3 +1,3 @@ CONFIG_MDNS_RESOLVE_TEST_SERVICES=y CONFIG_MDNS_ADD_MAC_TO_HOSTNAME=y -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y \ No newline at end of file +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y