]> git.ipfire.org Git - thirdparty/git.git/blobdiff - editor.c
Replace calls to strbuf_init(&foo, 0) with STRBUF_INIT initializer
[thirdparty/git.git] / editor.c
index eebc3e95fe0c7e61f7c29fa5412ea9d4a5900f92..4d469d076bcd58df3af16d98adc9120e34765944 100644 (file)
--- 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);