]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make make_addresses() actually return the addresses 27075/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 30 Mar 2023 18:18:26 +0000 (20:18 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 30 Mar 2023 18:42:47 +0000 (20:42 +0200)
I noticed missing coverage in the reports and turns out this has been
broken since forever (i.e. 2016 - 9f7672b3bc), whoopsie.

src/test/test-nss-hosts.c

index defecd3a51182ce83919eabddf04984d50fdac30..2fbcde41d6b489e038c967bee4d7e4ce80bda54b 100644 (file)
@@ -367,7 +367,9 @@ static int make_addresses(struct local_address **addresses) {
                                               .address.in = { htobe32(0x7F000002) } };
         addrs[n++] = (struct local_address) { .family = AF_INET6,
                                               .address.in6 = in6addr_loopback };
-        return 0;
+
+        *addresses = TAKE_PTR(addrs);
+        return n;
 }
 
 static int test_one_module(const char *dir,