diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-10-17 06:53:47 +0200 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2024-10-17 16:59:55 -0400 |
commit | 7fa7e14ebee9d82545bb4a8dcc1cac22ef51cfed (patch) | |
tree | 324fe59913e00241fd7560cbcbd4be39a4efa769 /gitweb/static/js | |
parent | 409f04995e6ede838576fb795cf45dc6f10ab508 (diff) |
reftable: stop using `strbuf_addf()`
We're about to introduce our own `reftable_buf` type to replace
`strbuf`. One function we'll have to convert is `strbuf_addf()`, which
is used in a handful of places. This function uses `snprintf()`
internally, which makes porting it a bit more involved:
- It is not available on all platforms.
- Some platforms like Windows have broken implementations.
So by using `snprintf()` we'd also push the burden on downstream users
of the reftable library to make available a properly working version of
it.
Most callsites of `strbuf_addf()` are trivial to convert to not using
it. We do end up using `snprintf()` in our unit tests, but that isn't
much of a problem for downstream users of the reftable library.
While at it, remove a useless call to `strbuf_reset()` in
`t_reftable_stack_auto_compaction_with_locked_tables()`. We don't write
to the buffer before this and initialize it with `STRBUF_INIT`, so there
is no need to reset anything.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'gitweb/static/js')
0 files changed, 0 insertions, 0 deletions