summaryrefslogtreecommitdiff
path: root/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'editor.c')
-rw-r--r--editor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/editor.c b/editor.c
index eebc3e9..4d469d0 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);