use oidcpy() for copying hashes between instances of struct object_id

Patch generated by Coccinelle and contrib/coccinelle/object_id.cocci.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2017-01-28 23:03:06 +01:00 committed by Junio C Hamano
parent 2490574d15
commit 8694769f3c
2 changed files with 3 additions and 3 deletions

View File

@ -697,7 +697,7 @@ static int cache_ref_iterator_peel(struct ref_iterator *ref_iterator,
if (peel_entry(entry, 0)) if (peel_entry(entry, 0))
return -1; return -1;
hashcpy(peeled->hash, entry->u.value.peeled.hash); oidcpy(peeled, &entry->u.value.peeled);
return 0; return 0;
} }

View File

@ -628,7 +628,7 @@ static void wt_status_collect_changes_initial(struct wt_status *s)
d->index_status = DIFF_STATUS_ADDED; d->index_status = DIFF_STATUS_ADDED;
/* Leave {mode,oid}_head zero for adds. */ /* Leave {mode,oid}_head zero for adds. */
d->mode_index = ce->ce_mode; d->mode_index = ce->ce_mode;
hashcpy(d->oid_index.hash, ce->oid.hash); oidcpy(&d->oid_index, &ce->oid);
} }
} }
} }
@ -2096,7 +2096,7 @@ static void wt_porcelain_v2_print_unmerged_entry(
if (strcmp(ce->name, it->string) || !stage) if (strcmp(ce->name, it->string) || !stage)
break; break;
stages[stage - 1].mode = ce->ce_mode; stages[stage - 1].mode = ce->ce_mode;
hashcpy(stages[stage - 1].oid.hash, ce->oid.hash); oidcpy(&stages[stage - 1].oid, &ce->oid);
sum |= (1 << (stage - 1)); sum |= (1 << (stage - 1));
} }
if (sum != d->stagemask) if (sum != d->stagemask)