summaryrefslogtreecommitdiffstats
path: root/strbuf.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-25 23:13:47 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-25 23:13:47 +0200
commitb4e8a847ba4e775fb7d422b2daf18356db50eec8 (patch)
treeb7beddae0b6b9800c8a40dfc6b4be33764b6a4a6 /strbuf.h
parentMerge branch 'ew/autoconf-pthread' (diff)
parentstrbuf: avoid calling strbuf_grow() twice in strbuf_addbuf() (diff)
downloadgit-b4e8a847ba4e775fb7d422b2daf18356db50eec8.tar.xz
git-b4e8a847ba4e775fb7d422b2daf18356db50eec8.zip
Merge branch 'rs/use-strbuf-addbuf'
Code cleanup. * rs/use-strbuf-addbuf: strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf() use strbuf_addbuf() for appending a strbuf to another
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/strbuf.h b/strbuf.h
index 83c5c98530..ba8d5f1d46 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -263,11 +263,7 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s)
/**
* Copy the contents of another buffer at the end of the current one.
*/
-static inline void strbuf_addbuf(struct strbuf *sb, const struct strbuf *sb2)
-{
- strbuf_grow(sb, sb2->len);
- strbuf_add(sb, sb2->buf, sb2->len);
-}
+extern void strbuf_addbuf(struct strbuf *sb, const struct strbuf *sb2);
/**
* Copy part of the buffer from a given position till a given length to the