Skip to content

Commit

Permalink
Merge branch 'jc/maint-strbuf-add-fix-doubling'
Browse files Browse the repository at this point in the history
* jc/maint-strbuf-add-fix-doubling:
  strbuf_addbuf(): allow passing the same buf to dst and src
  • Loading branch information
Junio C Hamano committed Jan 20, 2010
2 parents 71b3ef1 + 81d2cae commit 886932e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions strbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s) {
strbuf_add(sb, s, strlen(s));
}
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_adddup(struct strbuf *sb, size_t pos, size_t len);
Expand Down

0 comments on commit 886932e

Please sign in to comment.