X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=ws.c;h=b1efcd9d753a29d295702b36fb1beba58fb16995;hb=36dd9393938d4e7f8843c6c587c9b4db077377fc;hp=7a7ff130a34942506e6068105ac5946c9404bf18;hpb=1500f7bc1366e71edb7e8a31f3cf5614e9591cc2;p=git.git diff --git a/ws.c b/ws.c index 7a7ff130a..b1efcd9d7 100644 --- a/ws.c +++ b/ws.c @@ -99,8 +99,7 @@ unsigned whitespace_rule(const char *pathname) /* The returned string should be freed by the caller. */ char *whitespace_error_string(unsigned ws) { - struct strbuf err; - strbuf_init(&err, 0); + struct strbuf err = STRBUF_INIT; if (ws & WS_TRAILING_SPACE) strbuf_addstr(&err, "trailing whitespace"); if (ws & WS_SPACE_BEFORE_TAB) {