X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=editor.c;h=4d469d076bcd58df3af16d98adc9120e34765944;hb=bc9c0248a5cf184756ba562d6c452cace8863517;hp=eebc3e95fe0c7e61f7c29fa5412ea9d4a5900f92;hpb=f44bc33c7283c19a86797ffdaafd22a19bbdfbd6;p=git.git diff --git a/editor.c b/editor.c index eebc3e95f..4d469d076 100644 --- a/editor.c +++ b/editor.c @@ -26,9 +26,8 @@ int launch_editor(const char *path, struct strbuf *buffer, const char *const *en int i = 0; int failed; const char *args[6]; - struct strbuf arg0; + struct strbuf arg0 = STRBUF_INIT; - strbuf_init(&arg0, 0); if (strcspn(editor, "$ \t'") != len) { /* there are specials */ strbuf_addf(&arg0, "%s \"$@\"", editor);