From: Lennart Poettering Date: Sun, 27 Dec 2015 21:22:39 +0000 (+0100) Subject: resolve-host: log RR parsing errors X-Git-Tag: v229~187^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=502a7985993758e0bc64778e20ebb7d3941a6f55;p=thirdparty%2Fsystemd.git resolve-host: log RR parsing errors --- diff --git a/src/resolve-host/resolve-host.c b/src/resolve-host/resolve-host.c index 67c93c26188..793c560373d 100644 --- a/src/resolve-host/resolve-host.c +++ b/src/resolve-host/resolve-host.c @@ -408,13 +408,11 @@ static int resolve_record(sd_bus *bus, const char *name) { r = dns_packet_read_rr(p, &rr, NULL, NULL); if (r < 0) - return log_error_errno(r, "Failed to parse RR."); + return log_error_errno(r, "Failed to parse RR: %m"); s = dns_resource_record_to_string(rr); - if (!s) { - log_error("Failed to format RR."); - return -ENOMEM; - } + if (!s) + return log_oom(); ifname[0] = 0; if (ifindex > 0 && !if_indextoname(ifindex, ifname))