Commit 9a8386a
committed
buffer: consistently use
The `ENSURE_SIZE` macro can be used to grow a buffer if its currently
allocated size does not suffice a required target size. While most of
the code already uses this macro, the `git_buf_join` and `git_buf_join3`
functions do not yet use it. Due to the macro first checking whether we
have to grow the buffer at all, this has the benefit of saving a
function call when it is not needed. While this is nice to have, it will
probably not matter at all performance-wise -- instead, this only serves
for consistency across the code.ENSURE_SIZE to grow buffers on-demand1 parent e82dd81 commit 9a8386a
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
728 | | - | |
729 | | - | |
| 727 | + | |
730 | 728 | | |
731 | 729 | | |
732 | 730 | | |
| |||
780 | 778 | | |
781 | 779 | | |
782 | 780 | | |
783 | | - | |
784 | | - | |
| 781 | + | |
785 | 782 | | |
786 | 783 | | |
787 | 784 | | |
| |||
0 commit comments