]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-local-addresses: inline iterator variable
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2022 10:43:35 +0000 (12:43 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2022 10:57:31 +0000 (12:57 +0200)
src/test/test-local-addresses.c

index 732d47a3f924d85bb497fa0f767cab7bb94d304e..449192f0e0cd01e70412765a36ca3850b0623559 100644 (file)
@@ -9,9 +9,7 @@
 #include "tests.h"
 
 static void print_local_addresses(struct local_address *a, unsigned n) {
-        unsigned i;
-
-        for (i = 0; i < n; i++) {
+        for (unsigned i = 0; i < n; i++) {
                 _cleanup_free_ char *b = NULL;
 
                 assert_se(in_addr_to_string(a[i].family, &a[i].address, &b) >= 0);