projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: improve readability of dynamic buffer append condition
[lttng-tools.git]
/
src
/
common
/
dynamic-buffer.c
diff --git
a/src/common/dynamic-buffer.c
b/src/common/dynamic-buffer.c
index ea26a51aca78297cea5b1a7b97840cdec97cf884..f34ae8c492d6bba76818c7e47c004c6f72894bff 100644
(file)
--- a/
src/common/dynamic-buffer.c
+++ b/
src/common/dynamic-buffer.c
@@
-55,7
+55,7
@@
int lttng_dynamic_buffer_append(struct lttng_dynamic_buffer *buffer,
goto end;
}
goto end;
}
- if (
(buffer->capacity - buffer->size) < len
) {
+ if (
buffer->capacity < (len + buffer->size)
) {
ret = lttng_dynamic_buffer_set_capacity(buffer,
buffer->capacity +
(len - (buffer->capacity - buffer->size)));
ret = lttng_dynamic_buffer_set_capacity(buffer,
buffer->capacity +
(len - (buffer->capacity - buffer->size)));
This page took
0.023393 seconds
and
4
git commands to generate.