diff options
Diffstat (limited to 'src/push.c')
-rw-r--r-- | src/push.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/push.c b/src/push.c index 9943f215c..be5ec1c0e 100644 --- a/src/push.c +++ b/src/push.c @@ -716,14 +716,9 @@ void git_push_free(git_push *push) git__free(push); } -int git_push_init_options(git_push_options* opts, int version) +int git_push_init_options(git_push_options *opts, unsigned int version) { - if (version != GIT_PUSH_OPTIONS_VERSION) { - giterr_set(GITERR_INVALID, "Invalid version %d for git_push_options", version); - return -1; - } else { - git_push_options o = GIT_PUSH_OPTIONS_INIT; - memcpy(opts, &o, sizeof(o)); - return 0; - } + GIT_INIT_STRUCTURE_FROM_TEMPLATE( + opts, version, git_push_options, GIT_PUSH_OPTIONS_INIT); + return 0; } |