tree-wide: assorted coccinelle fixes

This commit is contained in:
Frantisek Sumsal
2020-10-09 15:02:23 +02:00
parent 44e66de0f2
commit d7a0f1f4f9
56 changed files with 351 additions and 399 deletions
+1 -2
View File
@@ -1234,8 +1234,7 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) {
return -ENOMEM;
if (!strv_isempty(a)) {
lease->search_domains = a;
a = NULL;
lease->search_domains = TAKE_PTR(a);
}
}
+3 -3
View File
@@ -23,10 +23,10 @@ static void test_pool(struct in_addr *address, unsigned size, int ret) {
static int test_basic(sd_event *event) {
_cleanup_(sd_dhcp_server_unrefp) sd_dhcp_server *server = NULL;
struct in_addr address_lo = {
.s_addr = htonl(INADDR_LOOPBACK),
.s_addr = htobe32(INADDR_LOOPBACK),
};
struct in_addr address_any = {
.s_addr = htonl(INADDR_ANY),
.s_addr = htobe32(INADDR_ANY),
};
int r;
@@ -105,7 +105,7 @@ static void test_message_handler(void) {
.end = SD_DHCP_OPTION_END,
};
struct in_addr address_lo = {
.s_addr = htonl(INADDR_LOOPBACK),
.s_addr = htobe32(INADDR_LOOPBACK),
};
assert_se(sd_dhcp_server_new(&server, 1) >= 0);