diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:52:39 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:52:39 +0200 |
commit | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (patch) | |
tree | b88cc7a8457658d67e0321718556ac807f6bccf3 /src/dnscname.c | |
parent | 00be7622c428f279872f84569f098ce16150f8a8 (diff) |
format files
Diffstat (limited to 'src/dnscname.c')
-rw-r--r-- | src/dnscname.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/dnscname.c b/src/dnscname.c index 546d273..17265d3 100644 --- a/src/dnscname.c +++ b/src/dnscname.c @@ -1,31 +1,31 @@ #include <unistd.h> + #include "buffer.h" -#include "stralloc.h" #include "dnsresolv.h" #include "exit.h" -#include "dns.h" #include "logmsg.h" +#include "stralloc.h" + +#include "dns.h" #define WHO "dnscname" stralloc sa = {0}; stralloc out = {0}; -int main(int argc,char **argv) +int main(int argc, char **argv) { - int r; + int r; - if (!argv[1]) - logmsg(WHO,100,USAGE,"dnscname fqdn"); + if (!argv[1]) logmsg(WHO, 100, USAGE, "dnscname fqdn"); - if (!stralloc_copys(&sa,argv[1])) - logmsg(WHO,111,FATAL,"out of memory"); + if (!stralloc_copys(&sa, argv[1])) logmsg(WHO, 111, FATAL, "out of memory"); DNS_INIT - if ((r = dns_cname(&out,&sa)) < 0) _exit(1); + if ((r = dns_cname(&out, &sa)) < 0) _exit(1); if (r > 0) { - buffer_putflush(buffer_1,out.s,out.len); - buffer_putsflush(buffer_1,"\n"); + buffer_putflush(buffer_1, out.s, out.len); + buffer_putsflush(buffer_1, "\n"); } _exit(0); |