diff --git a/src/common/crypto/cipherBlock.c b/src/common/crypto/cipherBlock.c index ad0cb0a6f..002d2a1f4 100644 --- a/src/common/crypto/cipherBlock.c +++ b/src/common/crypto/cipherBlock.c @@ -392,7 +392,7 @@ cipherBlockNew(CipherMode mode, CipherType cipherType, const Buffer *pass, const FUNCTION_LOG_END(); ASSERT(pass != NULL); - ASSERT(bufSize(pass) > 0); + ASSERT(bufUsed(pass) > 0); // Init crypto subsystem cryptoInit(); diff --git a/src/common/io/read.c b/src/common/io/read.c index a4709d606..d560be10c 100644 --- a/src/common/io/read.c +++ b/src/common/io/read.c @@ -282,7 +282,7 @@ ioReadLineParam(IoRead *this, bool allowEof) // If the buffer is full then the linefeed (if it exists) is outside the buffer if (bufFull(this->output)) - THROW_FMT(FileReadError, "unable to find line in %zu byte buffer", bufSize(this->output)); + THROW_FMT(FileReadError, "unable to find line in %zu byte buffer", bufUsed(this->output)); if (ioReadEof(this)) { diff --git a/src/common/type/xml.c b/src/common/type/xml.c index ff5146394..3dcbca77e 100644 --- a/src/common/type/xml.c +++ b/src/common/type/xml.c @@ -451,7 +451,7 @@ xmlDocumentNewBuf(const Buffer *buffer) FUNCTION_TEST_END(); ASSERT(buffer != NULL); - ASSERT(bufSize(buffer) > 0); + ASSERT(bufUsed(buffer) > 0); FUNCTION_TEST_RETURN(xmlDocumentNewC(bufPtrConst(buffer), bufUsed(buffer))); } diff --git a/src/storage/s3/storage.c b/src/storage/s3/storage.c index 6ed4636e3..e4d68ca36 100644 --- a/src/storage/s3/storage.c +++ b/src/storage/s3/storage.c @@ -804,7 +804,7 @@ storageS3PathRemoveInternal(StorageS3 *this, HttpRequest *request, XmlDocument * const Buffer *response = httpResponseContent(storageS3ResponseP(request)); // Nothing is returned when there are no errors - if (bufSize(response) > 0) + if (bufUsed(response) > 0) { XmlNodeList *errorList = xmlNodeChildList(xmlDocumentRoot(xmlDocumentNewBuf(response)), S3_XML_TAG_ERROR_STR);