Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
stash: take advantage of eval_gettextln
[gitweb.git]
/
strbuf.c
diff --git
a/strbuf.c
b/strbuf.c
index a71de9cd63a695ba67b3ca3175926f5280827a63..1a7df12e8f233863cd931a960d453d54050f5584 100644
(file)
--- a/
strbuf.c
+++ b/
strbuf.c
@@
-30,8
+30,10
@@
void strbuf_init(struct strbuf *sb, size_t hint)
{
sb->alloc = sb->len = 0;
sb->buf = strbuf_slopbuf;
- if (hint)
+ if (hint)
{
strbuf_grow(sb, hint);
+ sb->buf[0] = '\0';
+ }
}
void strbuf_release(struct strbuf *sb)