From 8655a8985bcf2891390d464401b198d629edbfc3 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Wed, 30 Apr 2014 11:16:31 -0700 Subject: Fix remaining init_options inconsistencies There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed. --- src/status.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/status.c') diff --git a/src/status.c b/src/status.c index bcc2692d2..8d7612f72 100644 --- a/src/status.c +++ b/src/status.c @@ -528,11 +528,8 @@ int git_status_init_options(git_status_options *opts, unsigned int version) int git_status_list_get_perfdata( git_diff_perfdata *out, const git_status_list *status) { - if (!out || out->version != GIT_DIFF_PERFDATA_VERSION) { - giterr_set(GITERR_INVALID, "Invalid version %d for git_diff_perfdata", - out ? out->version : 0); - return -1; - } + assert(out); + GITERR_CHECK_VERSION(out, GIT_DIFF_PERFDATA_VERSION, "git_diff_perfdata"); out->stat_calls = 0; out->oid_calculations = 0; -- cgit v1.2.1