path: root/strbuf.c
diff options
authorJunio C Hamano <>2018-05-30 05:04:07 (GMT)
committerJunio C Hamano <>2018-05-30 05:04:07 (GMT)
commit50f08db5941755b69012378bfc86f6b8ee98edf4 (patch)
treed403a1dbf522fdaab4cf6b9b508a08b3965828e2 /strbuf.c
parentbef896e4ab414312cdca493e0306d66ec7246b01 (diff)
parent746ea4adc6cd88ad5f5af6beebace581fe489b2f (diff)
Merge branch 'js/use-bug-macro'
Developer support update, by using BUG() macro instead of die() to mark codepaths that should not happen more clearly. * js/use-bug-macro: BUG_exit_code: fix sparse "symbol not declared" warning Convert remaining die*(BUG) messages Replace all die("BUG: ...") calls by BUG() ones run-command: use BUG() to report bugs, not die() test-tool: help verifying BUG() code paths
Diffstat (limited to 'strbuf.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/strbuf.c b/strbuf.c
index 75d0c2d..b0716ac 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -334,12 +334,12 @@ void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap)
len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, cp);
if (len < 0)
- die("BUG: your vsnprintf is broken (returned %d)", len);
+ BUG("your vsnprintf is broken (returned %d)", len);
if (len > strbuf_avail(sb)) {
strbuf_grow(sb, len);
len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
if (len > strbuf_avail(sb))
- die("BUG: your vsnprintf is broken (insatiable)");
+ BUG("your vsnprintf is broken (insatiable)");
strbuf_setlen(sb, sb->len + len);