]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/remote.c
Rewrite dynamic structure initializations to runtime assignment
[thirdparty/git.git] / builtin / remote.c
index 277765b864202b2b6f20069e0cb3f95eaef4fcaa..23ece02aad31a7d1a5405ea3d5b8caefb265165b 100644 (file)
@@ -705,11 +705,14 @@ static int rm(int argc, const char **argv)
        struct known_remotes known_remotes = { NULL, NULL };
        struct string_list branches = { NULL, 0, 0, 1 };
        struct string_list skipped = { NULL, 0, 0, 1 };
-       struct branches_for_remote cb_data = {
-               NULL, &branches, &skipped, &known_remotes
-       };
+       struct branches_for_remote cb_data;
        int i, result;
 
+       memset(&cb_data, 0, sizeof(cb_data));
+       cb_data.branches = &branches;
+       cb_data.skipped = &skipped;
+       cb_data.keep = &known_remotes;
+
        if (argc != 2)
                usage_with_options(builtin_remote_rm_usage, options);