]> 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)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Tue, 19 Mar 2019 12:31:21 +0000 (13:31 +0100)
src/lib/buffer.h

index 7480f3128b92364c69eab66966307b17e842c8a9..da0a81e6232afd0f99f7d3fd82e4269ceda40c37 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. */