t9001: style modernisation phase #3
[gitweb.git] / builtin / notes.c
index 0606964ce483f472d03a8b35a239bdf5fd465f3e..68b6cd8cc1ded390df592e1c6536d70bf1ffc8a0 100644 (file)
@@ -122,12 +122,11 @@ static void write_commented_object(int fd, const unsigned char *object)
 {
        const char *show_args[5] =
                {"show", "--stat", "--no-notes", sha1_to_hex(object), NULL};
-       struct child_process show;
+       struct child_process show = CHILD_PROCESS_INIT;
        struct strbuf buf = STRBUF_INIT;
        struct strbuf cbuf = STRBUF_INIT;
 
        /* Invoke "git show --stat --no-notes $object" */
-       memset(&show, 0, sizeof(show));
        show.argv = show_args;
        show.no_stdin = 1;
        show.out = -1;
@@ -703,7 +702,7 @@ static int merge_commit(struct notes_merge_options *o)
        init_notes(t, "NOTES_MERGE_PARTIAL", combine_notes_overwrite, 0);
 
        o->local_ref = local_ref_to_free =
-               resolve_refdup("NOTES_MERGE_REF", sha1, 0, NULL);
+               resolve_refdup("NOTES_MERGE_REF", 0, sha1, NULL);
        if (!o->local_ref)
                die("Failed to resolve NOTES_MERGE_REF");