summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-24 19:18:39 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-26 09:47:45 +0200
commitdddc8d1e1e69b5a941cffcaa03ab2cf60310ece4 (patch)
treed85623323ace38b7d244e737e81266b9bc2e8dbb /src/network
parent2206aa5c35a20f923b6b80294725085833b86ce3 (diff)
downloadsystemd-dddc8d1e1e69b5a941cffcaa03ab2cf60310ece4.tar.gz
sd-network: reduce scope of some variables
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index fbabe67868..43b5d8e3c9 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -3982,11 +3982,9 @@ static void print_link_hashmap(FILE *f, const char *prefix, Hashmap* h) {
}
static void link_save_dns(FILE *f, struct in_addr_data *dns, unsigned n_dns, bool *space) {
- unsigned j;
- int r;
-
- for (j = 0; j < n_dns; j++) {
+ for (unsigned j = 0; j < n_dns; j++) {
_cleanup_free_ char *b = NULL;
+ int r;
r = in_addr_to_string(dns[j].family, &dns[j].address, &b);
if (r < 0) {