diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2013-05-02 23:58:40 +0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2013-05-02 23:58:40 +0400 |
commit | 4e7c15608f427466ef941cad45b27f1ad30bd25a (patch) | |
tree | 0dbafbe9580d7d3ae51f30b8c9789afad7504b15 /tests-clar/merge | |
parent | af7689ea2489b2e92d46086a689ec074dd0854f5 (diff) |
puns are not funny; type punning especially so
Diffstat (limited to 'tests-clar/merge')
-rw-r--r-- | tests-clar/merge/merge_helpers.c | 6 | ||||
-rw-r--r-- | tests-clar/merge/merge_helpers.h | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/tests-clar/merge/merge_helpers.c b/tests-clar/merge/merge_helpers.c index 5c3421e7e..71bb96781 100644 --- a/tests-clar/merge/merge_helpers.c +++ b/tests-clar/merge/merge_helpers.c @@ -149,9 +149,9 @@ static int name_entry_eq_merge_name_entry(const struct merge_name_entry *expecte static int index_conflict_data_eq_merge_diff(const struct merge_index_conflict_data *expected, git_merge_diff *actual) { - if (!index_entry_eq_merge_index_entry((const struct merge_index_entry *)&expected->ancestor, &actual->ancestor_entry) || - !index_entry_eq_merge_index_entry((const struct merge_index_entry *)&expected->ours, &actual->our_entry) || - !index_entry_eq_merge_index_entry((const struct merge_index_entry *)&expected->theirs, &actual->their_entry)) + if (!index_entry_eq_merge_index_entry(&expected->ancestor.entry, &actual->ancestor_entry) || + !index_entry_eq_merge_index_entry(&expected->ours.entry, &actual->our_entry) || + !index_entry_eq_merge_index_entry(&expected->theirs.entry, &actual->their_entry)) return 0; if (expected->ours.status != actual->our_status || diff --git a/tests-clar/merge/merge_helpers.h b/tests-clar/merge/merge_helpers.h index 1a0b8921b..cb718e01a 100644 --- a/tests-clar/merge/merge_helpers.h +++ b/tests-clar/merge/merge_helpers.h @@ -18,11 +18,8 @@ struct merge_name_entry { }; struct merge_index_with_status { - uint16_t mode; - char oid_str[41]; - int stage; - char path[128]; - unsigned int status; + struct merge_index_entry entry; + unsigned int status; }; struct merge_reuc_entry { |