diff options
author | Daniel Mack <github@zonque.org> | 2016-07-18 09:54:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-18 09:54:06 +0200 |
commit | d909beef0a97d931de92723746a4e3ae9c7f1194 (patch) | |
tree | 4d70c4cdb45829ba01d3c5a4a0afee1e695a71cf /src | |
parent | ccc2c98e1b0c06861577632440b996ca16cefd53 (diff) | |
parent | fc549b96054d52bbde68a4aa773bf4037700d389 (diff) |
Merge pull request #3746 from keszybz/trivial-fixes
Trivial fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/strv.c | 3 | ||||
-rw-r--r-- | src/resolve/resolve-tool.c | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/basic/strv.c b/src/basic/strv.c index e0e2d1ebbe..db315ac10a 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -803,9 +803,8 @@ char **strv_reverse(char **l) { if (n <= 1) return l; - for (i = 0; i < n / 2; i++) { + for (i = 0; i < n / 2; i++) SWAP_TWO(l[i], l[n-1-i]); - } return l; } diff --git a/src/resolve/resolve-tool.c b/src/resolve/resolve-tool.c index 4e1e916669..6ae3750417 100644 --- a/src/resolve/resolve-tool.c +++ b/src/resolve/resolve-tool.c @@ -1229,8 +1229,8 @@ static int status_ifindex(sd_bus *bus, int ifindex, const char *name, bool *empt yes_no(link_info.dnssec_supported)); STRV_FOREACH(i, link_info.dns) { - printf(" %s %s\n", - i == link_info.dns ? "DNS Server:" : " ", + printf(" %s %s\n", + i == link_info.dns ? "DNS Servers:" : " ", *i); } @@ -1412,8 +1412,8 @@ static int status_global(sd_bus *bus, bool *empty_line) { printf("%sGlobal%s\n", ansi_highlight(), ansi_normal()); STRV_FOREACH(i, global_info.dns) { - printf(" %s %s\n", - i == global_info.dns ? "DNS Server:" : " ", + printf(" %s %s\n", + i == global_info.dns ? "DNS Servers:" : " ", *i); } @@ -1446,7 +1446,7 @@ static int status_all(sd_bus *bus) { _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL, *reply = NULL; _cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL; sd_netlink_message *i; - bool empty_line = true; + bool empty_line = false; int r; assert(bus); |