]> git.ipfire.org Git - thirdparty/git.git/blobdiff - strbuf.c
Replace all die("BUG: ...") calls by BUG() ones
[thirdparty/git.git] / strbuf.c
index 0759590b3e56de0fab6ff34f25206fb4cdeca4c5..2954622c10326c61febab4aa035e8f0a964c836d 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -309,12 +309,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);
        va_end(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);
 }
@@ -881,12 +881,12 @@ void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
        strbuf_setlen(sb, sb->len + len);
 }
 
-void strbuf_add_unique_abbrev(struct strbuf *sb, const unsigned char *sha1,
+void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
                              int abbrev_len)
 {
        int r;
        strbuf_grow(sb, GIT_SHA1_HEXSZ + 1);
-       r = find_unique_abbrev_r(sb->buf + sb->len, sha1, abbrev_len);
+       r = find_unique_abbrev_r(sb->buf + sb->len, oid, abbrev_len);
        strbuf_setlen(sb, sb->len + r);
 }