diff --git a/CHANGELOG.md b/CHANGELOG.md index 034b2c5ac..ebc7486b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added ### Changed ### Fixed +* Adding initialization to struct scanner in `boreas/util_tests.c`. [#438](https://github.com/greenbone/gvm-libs/pull/438) + ### Removed [20.8.2]: https://github.com/greenbone/gvm-libs/compare/v20.8.1...gvm-libs-20.08 diff --git a/base/networking.c b/base/networking.c index c451c648b..34b1d37c1 100644 --- a/base/networking.c +++ b/base/networking.c @@ -651,7 +651,7 @@ port_range_ranges (const char *port_range) if (element_strlen >= 2) { - if ((element[0] == 'T')) + if (element[0] == 'T') { element++; while (*element && isblank (*element)) @@ -662,7 +662,7 @@ port_range_ranges (const char *port_range) tcp = 1; } } - else if ((element[0] == 'U')) + else if (element[0] == 'U') { element++; while (*element && isblank (*element)) diff --git a/boreas/util_tests.c b/boreas/util_tests.c index 9edae9493..906aed9dd 100644 --- a/boreas/util_tests.c +++ b/boreas/util_tests.c @@ -75,7 +75,7 @@ Ensure (util, set_all_needed_sockets) g_setsockopt_use_real = false; alive_test_t alive_test; - struct scanner scanner = {}; + struct scanner scanner = {0}; /* All methods set. */ alive_test = ALIVE_TEST_TCP_ACK_SERVICE | ALIVE_TEST_ICMP | ALIVE_TEST_ARP