Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-12-07 14:05:52 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-07 23:31:16 +0300
commit46d699f492b86d7d9b84ca9c56c837ce80643dc2 (patch)
tree0fa8662f21e293e7e6b8d8427ec221015da76180 /strbuf.h
parent5867757d888e690eeafe8d6a68841623c4b8baa8 (diff)
strbuf.h: use BUG(...) not die("BUG: ...")
In 7141efab248 (strbuf: clarify assertion in strbuf_setlen(), 2011-04-27) this 'die("BUG: "' invocation was added with the rationale that strbuf.c had existing users doing the same, but those users were later changed to use BUG() in 033abf97fcb (Replace all die("BUG: ...") calls by BUG() ones, 2018-05-02). Let's do the same here. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/strbuf.h b/strbuf.h
index 96512f85b3..76965a17d4 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -160,7 +160,7 @@ void strbuf_grow(struct strbuf *sb, size_t amount);
static inline void strbuf_setlen(struct strbuf *sb, size_t len)
{
if (len > (sb->alloc ? sb->alloc - 1 : 0))
- die("BUG: strbuf_setlen() beyond buffer");
+ BUG("strbuf_setlen() beyond buffer");
sb->len = len;
if (sb->buf != strbuf_slopbuf)
sb->buf[len] = '\0';