]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 08:51:09 +0000 (11:51 +0300)
src/lib/buffer.h

index c8a0ea8f622fea2af85b954fa9d634354c203652..423fb9ba70ce0731775e4851d8e0f954bc3a6202 100644 (file)
@@ -52,10 +52,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. */