projects
/
deliverable
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add lttng_dynamic_buffer_get_capacity_left util
[deliverable/lttng-tools.git]
/
src
/
common
/
dynamic-buffer.c
diff --git
a/src/common/dynamic-buffer.c
b/src/common/dynamic-buffer.c
index fd39f813b3c2568beec2dff1be91343161ec8517..2e27afa1f92f446c12de25a0f268f6de33623536 100644
(file)
--- a/
src/common/dynamic-buffer.c
+++ b/
src/common/dynamic-buffer.c
@@
-186,3
+186,13
@@
void lttng_dynamic_buffer_reset(struct lttng_dynamic_buffer *buffer)
buffer->_capacity = 0;
free(buffer->data);
}
+
+LTTNG_HIDDEN
+size_t lttng_dynamic_buffer_get_capacity_left(
+ struct lttng_dynamic_buffer *buffer)
+{
+ if (!buffer) {
+ return 0;
+ }
+ return buffer->_capacity - buffer->size;
+}
This page took
0.024743 seconds
and
5
git commands to generate.