X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=convert.c;h=1816e977b7b13782003fc78a9de9b47cd3554a32;hb=4dd47c3b867f51211d0dc4474dab0fee5ca614da;hp=78efed800d4d64898d438d9590b01be008cfcd36;hpb=a0d74d160f3d416be8f7fbfd18fee0eebf40d8e0;p=git.git diff --git a/convert.c b/convert.c index 78efed800..1816e977b 100644 --- a/convert.c +++ b/convert.c @@ -281,7 +281,7 @@ static int apply_filter(const char *path, const char *src, size_t len, * (child --> cmd) --> us */ int ret = 1; - struct strbuf nbuf; + struct strbuf nbuf = STRBUF_INIT; struct async async; struct filter_params params; @@ -299,7 +299,6 @@ static int apply_filter(const char *path, const char *src, size_t len, if (start_async(&async)) return 0; /* error was already reported */ - strbuf_init(&nbuf, 0); if (strbuf_read(&nbuf, async.out, len) < 0) { error("read from external filter %s failed", cmd); ret = 0;