diff options
Diffstat (limited to 'src/clients/s6-dnsns.c')
-rw-r--r-- | src/clients/s6-dnsns.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/clients/s6-dnsns.c b/src/clients/s6-dnsns.c index d1caba5..6e86b89 100644 --- a/src/clients/s6-dnsns.c +++ b/src/clients/s6-dnsns.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <sys/types.h> #include <errno.h> #include <skalibs/uint.h> #include <skalibs/bytestr.h> @@ -18,7 +19,7 @@ int main (int argc, char const *const *argv) { genalloc ds = GENALLOC_ZERO ; /* array of s6dns_domain_t */ tain_t deadline ; - unsigned int i = 0 ; + unsigned int t = 0 ; int flagqualify = 0 ; int flagunsort = 0 ; PROG = "s6-dnsns" ; @@ -30,7 +31,7 @@ int main (int argc, char const *const *argv) { case 'q' : flagqualify = 1 ; break ; case 'r' : flagunsort = 1 ; break ; - case 't' : if (!uint0_scan(subgetopt_here.arg, &i)) dieusage() ; break ; + case 't' : if (!uint0_scan(subgetopt_here.arg, &t)) dieusage() ; break ; default : dieusage() ; } } @@ -38,7 +39,7 @@ int main (int argc, char const *const *argv) if (argc < 1) dieusage() ; tain_now_g() ; - if (i) tain_from_millisecs(&deadline, i) ; else deadline = tain_infinite_relative ; + if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ; tain_add_g(&deadline, &deadline) ; if (!s6dns_init()) strerr_diefu1sys(111, "s6dns_init") ; { @@ -50,7 +51,7 @@ int main (int argc, char const *const *argv) if (flagunsort) random_unsort(ds.s, genalloc_len(s6dns_domain_t, &ds), sizeof(s6dns_domain_t)) ; { char buf[S6DNS_FMT_DOMAINLIST(genalloc_len(s6dns_domain_t, &ds))] ; - unsigned int len = s6dns_fmt_domainlist(buf, S6DNS_FMT_DOMAINLIST(genalloc_len(s6dns_domain_t, &ds)), genalloc_s(s6dns_domain_t, &ds), genalloc_len(s6dns_domain_t, &ds), "\n", 1) ; + size_t len = s6dns_fmt_domainlist(buf, S6DNS_FMT_DOMAINLIST(genalloc_len(s6dns_domain_t, &ds)), genalloc_s(s6dns_domain_t, &ds), genalloc_len(s6dns_domain_t, &ds), "\n", 1) ; if (!len) strerr_diefu1sys(111, "format result") ; if (buffer_put(buffer_1, buf, len) < 0) goto err ; } |