diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-24 15:14:09 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-25 16:37:22 +0200 |
commit | 0a6c0745681f544508177f9abb93f9d637b2d002 (patch) | |
tree | a1f02f1ffb506fa8e14532fc199666104418f756 /src/resolve/resolved-bus.c | |
parent | 1bcefad91907e134a853430f18689b50e39ac5f7 (diff) | |
download | systemd-0a6c0745681f544508177f9abb93f9d637b2d002.tar.gz |
resolved: avoid allocation
While at it, constify the argument.
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r-- | src/resolve/resolved-bus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index db0f8381ef..920cb92a58 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -12,6 +12,7 @@ #include "resolved-dnssd-bus.h" #include "resolved-dnssd.h" #include "resolved-link-bus.h" +#include "stdio-util.h" #include "user-util.h" #include "utf8.h" @@ -68,7 +69,7 @@ static int reply_query_state(DnsQuery *q) { rc = dns_rcode_to_string(q->answer_rcode); if (!rc) { - sprintf(p, "%i", q->answer_rcode); + xsprintf(p, "%i", q->answer_rcode); rc = p; } |