From: Michal Nowak Date: Wed, 14 Oct 2020 09:46:03 +0000 (+0200) Subject: Drop unused bufferlist code X-Git-Tag: v9.17.7~48^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ef268bb4b42096b62f308347f80288b89046dc8;p=thirdparty%2Fbind9.git Drop unused bufferlist code --- diff --git a/bin/dig/dighost.h b/bin/dig/dighost.h index bc280e540e9..d27e40481d2 100644 --- a/bin/dig/dighost.h +++ b/bin/dig/dighost.h @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/lib/isc/Makefile.am b/lib/isc/Makefile.am index c6b63a410be..717da02e561 100644 --- a/lib/isc/Makefile.am +++ b/lib/isc/Makefile.am @@ -15,7 +15,6 @@ libisc_la_HEADERS = \ include/isc/base64.h \ include/isc/bind9.h \ include/isc/buffer.h \ - include/isc/bufferlist.h \ include/isc/cmocka.h \ include/isc/commandline.h \ include/isc/counter.h \ @@ -159,7 +158,6 @@ libisc_la_SOURCES = \ base64.c \ bind9.c \ buffer.c \ - bufferlist.c \ commandline.c \ counter.c \ crc64.c \ diff --git a/lib/isc/bufferlist.c b/lib/isc/bufferlist.c deleted file mode 100644 index 8393d1da085..00000000000 --- a/lib/isc/bufferlist.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include - -#include -#include -#include - -unsigned int -isc_bufferlist_usedcount(isc_bufferlist_t *bl) { - isc_buffer_t *buffer; - unsigned int length; - - REQUIRE(bl != NULL); - - length = 0; - buffer = ISC_LIST_HEAD(*bl); - while (buffer != NULL) { - REQUIRE(ISC_BUFFER_VALID(buffer)); - length += isc_buffer_usedlength(buffer); - buffer = ISC_LIST_NEXT(buffer, link); - } - - return (length); -} - -unsigned int -isc_bufferlist_availablecount(isc_bufferlist_t *bl) { - isc_buffer_t *buffer; - unsigned int length; - - REQUIRE(bl != NULL); - - length = 0; - buffer = ISC_LIST_HEAD(*bl); - while (buffer != NULL) { - REQUIRE(ISC_BUFFER_VALID(buffer)); - length += isc_buffer_availablelength(buffer); - buffer = ISC_LIST_NEXT(buffer, link); - } - - return (length); -} diff --git a/lib/isc/include/isc/bufferlist.h b/lib/isc/include/isc/bufferlist.h deleted file mode 100644 index 8fe6e36abf4..00000000000 --- a/lib/isc/include/isc/bufferlist.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_BUFFERLIST_H -#define ISC_BUFFERLIST_H 1 - -/***** -***** Module Info -*****/ - -/*! \file isc/bufferlist.h - * - * - *\brief Buffer lists have no synchronization. Clients must ensure - * exclusive * access. - * - * \li Reliability: - * No anticipated impact. - * - * \li Security: - * No anticipated impact. - * - * \li Standards: - * None. - */ - -/*** - *** Imports - ***/ - -#include -#include - -ISC_LANG_BEGINDECLS - -/*** - *** Functions - ***/ - -unsigned int -isc_bufferlist_usedcount(isc_bufferlist_t *bl); -/*!< - * \brief Return the length of the sum of all used regions of all buffers in - * the buffer list 'bl' - * - * Requires: - * - *\li 'bl' is not NULL. - * - * Returns: - *\li sum of all used regions' lengths. - */ - -unsigned int -isc_bufferlist_availablecount(isc_bufferlist_t *bl); -/*!< - * \brief Return the length of the sum of all available regions of all buffers - * in the buffer list 'bl' - * - * Requires: - * - *\li 'bl' is not NULL. - * - * Returns: - *\li sum of all available regions' lengths. - */ - -ISC_LANG_ENDDECLS - -#endif /* ISC_BUFFERLIST_H */ diff --git a/lib/isc/win32/libisc.def.in b/lib/isc/win32/libisc.def.in index 8c2ba39c904..6ce39f6fef2 100644 --- a/lib/isc/win32/libisc.def.in +++ b/lib/isc/win32/libisc.def.in @@ -161,8 +161,6 @@ isc_buffer_putdecint isc_buffer_reinit isc_buffer_reserve isc_buffer_setautorealloc -isc_bufferlist_availablecount -isc_bufferlist_usedcount isc_commandline_parse isc_commandline_strtoargv isc_condition_broadcast diff --git a/lib/isc/win32/libisc.vcxproj.filters.in b/lib/isc/win32/libisc.vcxproj.filters.in index 80f17237d74..216be2f3a31 100644 --- a/lib/isc/win32/libisc.vcxproj.filters.in +++ b/lib/isc/win32/libisc.vcxproj.filters.in @@ -59,9 +59,6 @@ Library Header Files - - Library Header Files - Library Header Files @@ -470,9 +467,6 @@ Library Source Files - - Library Source Files - Library Source Files diff --git a/lib/isc/win32/libisc.vcxproj.in b/lib/isc/win32/libisc.vcxproj.in index 17d292fb469..9da70435f0f 100644 --- a/lib/isc/win32/libisc.vcxproj.in +++ b/lib/isc/win32/libisc.vcxproj.in @@ -266,7 +266,6 @@ copy InstallFiles ..\Build\Release\ - @@ -383,7 +382,6 @@ copy InstallFiles ..\Build\Release\ - diff --git a/util/copyrights b/util/copyrights index d9a4420a340..20d0240542e 100644 --- a/util/copyrights +++ b/util/copyrights @@ -1759,7 +1759,6 @@ ./lib/isc/base64.c C 1998,1999,2000,2001,2003,2004,2005,2007,2009,2013,2014,2015,2016,2018,2019,2020 ./lib/isc/bind9.c C 2013,2016,2018,2019,2020 ./lib/isc/buffer.c C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2012,2014,2015,2016,2017,2018,2019,2020 -./lib/isc/bufferlist.c C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020 ./lib/isc/commandline.c C.PORTION 1999,2000,2001,2004,2005,2007,2008,2014,2015,2016,2018,2019,2020 ./lib/isc/counter.c C 2014,2016,2018,2019,2020 ./lib/isc/crc64.c C 2013,2016,2018,2019,2020 @@ -1788,7 +1787,6 @@ ./lib/isc/include/isc/base64.h C 1999,2000,2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isc/include/isc/bind9.h C 2009,2013,2016,2018,2019,2020 ./lib/isc/include/isc/buffer.h C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2010,2012,2014,2016,2017,2018,2019,2020 -./lib/isc/include/isc/bufferlist.h C 1999,2000,2001,2004,2005,2006,2007,2016,2018,2019,2020 ./lib/isc/include/isc/cmocka.h C 2020 ./lib/isc/include/isc/commandline.h C 1999,2000,2001,2004,2005,2006,2007,2015,2016,2018,2019,2020 ./lib/isc/include/isc/counter.h C 2014,2016,2018,2019,2020