From 3f9536c5cc9ed6659ad2514859bd1716cbf7b26b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 12 Jan 2017 15:35:29 +0000 Subject: Types fix, first pass. Some places marked XXX for the skalibs API change. --- src/clients/s6-dnsname.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/clients/s6-dnsname.c') diff --git a/src/clients/s6-dnsname.c b/src/clients/s6-dnsname.c index fe5ab9a..103edad 100644 --- a/src/clients/s6-dnsname.c +++ b/src/clients/s6-dnsname.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include #include #include #include @@ -20,7 +21,7 @@ int main (int argc, char const *const *argv) genalloc ds = GENALLOC_ZERO ; /* array of s6dns_domain_t */ tain_t deadline ; ip46full_t ip = IP46FULL_ZERO ; - unsigned int i = 0 ; + unsigned int t = 0 ; int flagunsort = 0 ; int do4 = 0 ; int do6 = 0 ; @@ -34,7 +35,7 @@ int main (int argc, char const *const *argv) case '4' : do4 = 1 ; break ; case '6' : do6 = 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() ; } } @@ -53,7 +54,7 @@ int main (int argc, char const *const *argv) else if (!ip4_scan(argv[0], ip.ip)) 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") ; { @@ -65,7 +66,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 ; } -- cgit v1.2.3