X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-stripspace.c;h=d6e3896c006796ccca12c00de45e36583387f05b;hb=35fb0e8633217f602360a9987af51c4b960e7850;hp=c0b21301ba4c126a49ed38b6983756b99a25aae0;hpb=847d10f56d7853cd0e139a7c2e6ad0ad2de5c464;p=git.git diff --git a/builtin-stripspace.c b/builtin-stripspace.c index c0b21301b..d6e3896c0 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");