projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add a util to create a buffer view from a raw buffer
[lttng-tools.git]
/
src
/
common
/
dynamic-buffer.c
diff --git
a/src/common/dynamic-buffer.c
b/src/common/dynamic-buffer.c
index 2e27afa1f92f446c12de25a0f268f6de33623536..cec2f1e608a67d1e0a148c491c8a8015ce5f27dc 100644
(file)
--- a/
src/common/dynamic-buffer.c
+++ b/
src/common/dynamic-buffer.c
@@
-148,7
+148,8
@@
int lttng_dynamic_buffer_set_capacity(struct lttng_dynamic_buffer *buffer,
{
int ret = 0;
void *new_buf;
- size_t new_capacity = round_to_power_of_2(demanded_capacity);
+ size_t new_capacity = demanded_capacity ?
+ round_to_power_of_2(demanded_capacity) : 0;
if (!buffer || demanded_capacity < buffer->size) {
/*
This page took
0.023203 seconds
and
4
git commands to generate.