summaryrefslogtreecommitdiff
path: root/builtin-stripspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-stripspace.c')
-rw-r--r--builtin-stripspace.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-stripspace.c b/builtin-stripspace.c
index c0b21301ba..d6e3896c00 100644
--- a/builtin-stripspace.c
+++ b/builtin-stripspace.c
@@ -70,14 +70,13 @@ void stripspace(struct strbuf *sb, int skip_comments)
int cmd_stripspace(int argc, const char **argv, const char *prefix)
{
- struct strbuf buf;
+ struct strbuf buf = STRBUF_INIT;
int strip_comments = 0;
if (argc > 1 && (!strcmp(argv[1], "-s") ||
!strcmp(argv[1], "--strip-comments")))
strip_comments = 1;
- strbuf_init(&buf, 0);
if (strbuf_read(&buf, 0, 1024) < 0)
die("could not read the input");