diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
commit | 20b85c03e751b4876fa3c92040464e483172b746 (patch) | |
tree | 734fadbfdbc143ec4465093857f4c239448715e0 /src/dnsip.c | |
parent | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff) |
manual format adjustment
Diffstat (limited to 'src/dnsip.c')
-rw-r--r-- | src/dnsip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dnsip.c b/src/dnsip.c index bbb2557..d6e3c0d 100644 --- a/src/dnsip.c +++ b/src/dnsip.c @@ -28,18 +28,20 @@ int main(int argc, char **argv) if (!stralloc_copys(&sa, argv[1])) logmsg(WHO, 111, FATAL, "out of memory"); DNS_INIT - if (dns_ip6(&out, &sa) > 0) /* IPv6 first */ + if (dns_ip6(&out, &sa) > 0) { /* IPv6 first */ for (i = 0; i + 16 <= out.len; i += 16) { if (ip6_isv4mapped(out.s + i)) continue; buffer_put(buffer_1, ip6str, ip6_fmt(ip6str, out.s + i)); buffer_puts(buffer_1, "\n"); } + } - if (dns_ip4(&out, &sa) > 0) + if (dns_ip4(&out, &sa) > 0) { for (i = 0; i + 4 <= out.len; i += 4) { buffer_put(buffer_1, ip4str, ip4_fmt(ip4str, out.s + i)); buffer_puts(buffer_1, "\n"); } + } buffer_putsflush(buffer_1, ""); _exit(0); |