X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=editor.c;h=4d469d076bcd58df3af16d98adc9120e34765944;hb=22ba47f544a233958c73a9260b18c57b431f44b3;hp=eebc3e95fe0c7e61f7c29fa5412ea9d4a5900f92;hpb=718258e256b74622aa55f5ee0cb9cff4cce6bf9f;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);