chiark / gitweb /
resolved: align last rr column
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 1 Aug 2014 23:36:33 +0000 (19:36 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 4 Aug 2014 01:46:08 +0000 (21:46 -0400)
src/resolve/resolved-dns-rr.c

index 6cb4ed9..7d1cfe4 100644 (file)
@@ -180,8 +180,7 @@ int dns_resource_key_to_string(const DnsResourceKey *key, char **ret) {
                 t = tbuf;
         }
 
-        s = strjoin(DNS_RESOURCE_KEY_NAME(key), " ", c, " ", t, NULL);
-        if (!s)
+        if (asprintf(&s, "%s %s %-5s", DNS_RESOURCE_KEY_NAME(key), c, t) < 0)
                 return -ENOMEM;
 
         *ret = s;