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/skadns/skadns_cancel.c | 3 ++- src/skadns/skadns_end.c | 3 ++- src/skadns/skadns_packet.c | 4 ++-- src/skadns/skadns_packetlen.c | 4 ++-- src/skadns/skadns_release.c | 4 ++-- src/skadns/skadns_send.c | 5 +++-- src/skadns/skadnsd.c | 7 ++++--- 7 files changed, 17 insertions(+), 13 deletions(-) (limited to 'src/skadns') diff --git a/src/skadns/skadns_cancel.c b/src/skadns/skadns_cancel.c index 7c76797..a9673ed 100644 --- a/src/skadns/skadns_cancel.c +++ b/src/skadns/skadns_cancel.c @@ -5,6 +5,7 @@ #define _BSD_SOURCE #endif +#include #include #include #include @@ -13,7 +14,7 @@ #include #include -int skadns_cancel (skadns_t *a, uint16 id, tain_t const *deadline, tain_t *stamp) +int skadns_cancel (skadns_t *a, uint16_t id, tain_t const *deadline, tain_t *stamp) { char pack[3] = "--q" ; char err ; diff --git a/src/skadns/skadns_end.c b/src/skadns/skadns_end.c index 6f5f01b..e6e8045 100644 --- a/src/skadns/skadns_end.c +++ b/src/skadns/skadns_end.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include #include #include #include @@ -17,7 +18,7 @@ static int skadnsanswer_free (char *p, void *stuff) void skadns_end (skadns_t *a) { skaclient_end(&a->connection) ; - genalloc_free(uint16, &a->list) ; + genalloc_free(uint16_t, &a->list) ; gensetdyn_iter(&a->q, &skadnsanswer_free, 0) ; gensetdyn_free(&a->q) ; *a = skadns_zero ; diff --git a/src/skadns/skadns_packet.c b/src/skadns/skadns_packet.c index c34b3a1..8ef8f1d 100644 --- a/src/skadns/skadns_packet.c +++ b/src/skadns/skadns_packet.c @@ -1,11 +1,11 @@ /* ISC license. */ +#include #include -#include #include #include -char const *skadns_packet (skadns_t const *a, uint16 id) +char const *skadns_packet (skadns_t const *a, uint16_t id) { register skadnsanswer_t *p = GENSETDYN_P(skadnsanswer_t, &a->q, id) ; switch (p->status) diff --git a/src/skadns/skadns_packetlen.c b/src/skadns/skadns_packetlen.c index 34cbb28..f69e43f 100644 --- a/src/skadns/skadns_packetlen.c +++ b/src/skadns/skadns_packetlen.c @@ -1,11 +1,11 @@ /* ISC license. */ +#include #include -#include #include #include -int skadns_packetlen (skadns_t const *a, uint16 id) +int skadns_packetlen (skadns_t const *a, uint16_t id) { register skadnsanswer_t *p = GENSETDYN_P(skadnsanswer_t, &a->q, id) ; switch (p->status) diff --git a/src/skadns/skadns_release.c b/src/skadns/skadns_release.c index 0cd4dc0..3ce2fc3 100644 --- a/src/skadns/skadns_release.c +++ b/src/skadns/skadns_release.c @@ -5,13 +5,13 @@ #define _BSD_SOURCE #endif +#include #include -#include #include #include #include -int skadns_release (skadns_t *a, uint16 id) +int skadns_release (skadns_t *a, uint16_t id) { register skadnsanswer_t *p = GENSETDYN_P(skadnsanswer_t, &a->q, id) ; switch (p->status) diff --git a/src/skadns/skadns_send.c b/src/skadns/skadns_send.c index f8152b7..f485c92 100644 --- a/src/skadns/skadns_send.c +++ b/src/skadns/skadns_send.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include #include #include #include @@ -13,14 +14,14 @@ static skadnsanswer_t const skadnsanswer_initial = { .status = EAGAIN, .data = 0, .len = 0 } ; -int skadns_send (skadns_t *a, uint16 *u, s6dns_domain_t const *d, uint16 qtype, tain_t const *limit, tain_t const *deadline, tain_t *stamp) +int skadns_send (skadns_t *a, uint16_t *u, s6dns_domain_t const *d, uint16_t qtype, tain_t const *limit, tain_t const *deadline, tain_t *stamp) { unsigned int i ; char tmp[17] = "--Q" ; char err ; siovec_t v[2] = { { .s = tmp, .len = 17 }, { .s = (char *)d->s, .len = d->len } } ; if (!gensetdyn_new(&a->q, &i)) return 0 ; - uint16_pack_big(tmp, (uint16)i) ; + uint16_pack_big(tmp, (uint16_t)i) ; uint16_pack_big(tmp + 3, qtype) ; if (limit) tain_pack(tmp + 5, limit) ; else byte_zero(tmp + 5, 12) ; if (!skaclient_sendv(&a->connection, v, 2, &skaclient_default_cb, &err, deadline, stamp)) diff --git a/src/skadns/skadnsd.c b/src/skadns/skadnsd.c index 11f52ea..2682ace 100644 --- a/src/skadns/skadnsd.c +++ b/src/skadns/skadnsd.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include #include #include #include @@ -19,7 +20,7 @@ struct dnsio_s { unsigned int xindex ; s6dns_engine_t dt ; - uint16 id ; + uint16_t id ; } ; #define DNSIO_ZERO { .xindex = SKADNS_MAXCONCURRENCY, .dt = S6DNS_ENGINE_ZERO, .id = 0 } @@ -55,7 +56,7 @@ static void answer (char c) static int parse_protocol (unixmessage_t const *m, void *context) { - uint16 id ; + uint16_t id ; if (m->len < 3 || m->nfds) strerr_dief1x(100, "invalid client request") ; uint16_unpack_big(m->s, &id) ; switch (m->s[2]) /* protocol parsing */ @@ -63,7 +64,7 @@ static int parse_protocol (unixmessage_t const *m, void *context) case 'Q' : /* send a query */ { tain_t limit ; - uint16 qtype ; + uint16_t qtype ; if (m->len < 21) strerr_dief1x(100, "invalid client request") ; if (sp >= SKADNS_MAXCONCURRENCY) { -- cgit v1.2.3