From: Jan Hák Date: Wed, 10 May 2023 12:20:03 +0000 (+0200) Subject: libknot: remove of unused static functions X-Git-Tag: v3.4.dev~138^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1edcc39b74eeb4c2eb8ddda0dde5f4b7b16002f;p=thirdparty%2Fknot-dns.git libknot: remove of unused static functions --- diff --git a/src/libknot/xdp/tcp_iobuf.c b/src/libknot/xdp/tcp_iobuf.c index b1cc515c06..65342d0de3 100644 --- a/src/libknot/xdp/tcp_iobuf.c +++ b/src/libknot/xdp/tcp_iobuf.c @@ -39,12 +39,6 @@ static void iov_inc(struct iovec *iov, size_t shift) iov->iov_len -= shift; } -/*! \brief Strip 2-byte length prefix from a payload. */ -static void iov_inc2(struct iovec *iov) -{ - iov_inc(iov, sizeof(uint16_t)); -} - static size_t tcp_payload_len(const struct iovec *payload) { if (payload->iov_len < 2) { @@ -53,35 +47,6 @@ static size_t tcp_payload_len(const struct iovec *payload) return knot_wire_read_u16(payload->iov_base); } -static bool iov_inc_pf(struct iovec *iov) -{ - size_t shift = tcp_payload_len(iov); - if (iov->iov_len >= shift) { - iov_inc(iov, shift); - return true; - } else { - return false; - } -} - -static size_t iov_count(const struct iovec *iov, size_t *out_data) -{ - size_t res = 0; - struct iovec tmp = *iov; - while (tmp.iov_len >= sizeof(uint16_t)) { - size_t shift = tcp_payload_len(iov); - if (tmp.iov_len < shift) { - return res; - } - res++; - if (out_data != NULL) { - *out_data += shift; - } - iov_inc(&tmp, shift); - } - return res; -} - static void iov_append(struct iovec *what, const struct iovec *with) { // NOTE: what->iov_base must be pre-allocated large enough