]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: buffer - Improve header comment for buffer_insert() and buffer_delete().
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 17 Mar 2019 23:52:37 +0000 (00:52 +0100)
committerMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Tue, 11 Jun 2019 10:48:43 +0000 (13:48 +0300)
src/lib/buffer.h

index 3428e60dec0137276077ce975ff08940e29cab50..601d1b43bea308dc2caf31a0c4d8977336ecf86d 100644 (file)
@@ -51,10 +51,13 @@ void buffer_append(buffer_t *buf, const void *data, size_t data_size);
 /* Append character to buffer. */
 void buffer_append_c(buffer_t *buf, unsigned char chr);
 
-/* Insert data to buffer. */
+/* Insert the provided data into the buffer at position pos. If pos points past
+   the current buffer size, the gap is zero-filled. */
 void buffer_insert(buffer_t *buf, size_t pos,
                   const void *data, size_t data_size);
-/* Delete data from buffer. */
+/* Delete data with the indicated size from the buffer at position pos. The
+   deleted block may cross the current buffer size boundary, which is ignored.
+ */
 void buffer_delete(buffer_t *buf, size_t pos, size_t size);
 
 /* Fill buffer with zero bytes. */