2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

Make a few helper macros which will return lengths of regions rather than

requiring an isc_region_t to fill in.  Use these macros in a few places.
This commit is contained in:
Michael Graff
1999-09-10 21:13:39 +00:00
parent 3b2b306f47
commit 07a9b8b588
4 changed files with 29 additions and 48 deletions

View File

@@ -34,7 +34,7 @@ isc_bufferlist_usedcount(isc_bufferlist_t *bl)
buffer = ISC_LIST_HEAD(*bl);
while (buffer != NULL) {
REQUIRE(ISC_BUFFER_VALID(buffer));
length += buffer->used;
length += ISC_BUFFER_USEDCOUNT(buffer);
buffer = ISC_LIST_NEXT(buffer, link);
}
@@ -53,7 +53,7 @@ isc_bufferlist_availablecount(isc_bufferlist_t *bl)
buffer = ISC_LIST_HEAD(*bl);
while (buffer != NULL) {
REQUIRE(ISC_BUFFER_VALID(buffer));
length += (buffer->length - buffer->used);
length += ISC_BUFFER_AVAILABLECOUNT(buffer);
buffer = ISC_LIST_NEXT(buffer, link);
}