diff options
| author | Junio C Hamano <junkio@cox.net> | 2006-08-26 01:06:22 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-08-26 01:06:22 -0700 |
| commit | a7f051987c5f020e60da1e5d6ddefc3d443d3299 (patch) | |
| tree | ad35bcb194fce5509db30e12b499920b01ccc930 /builtin-diff.c | |
| parent | 030b52087f0a4b7b1178d34839868ce438eb2f0e (diff) | |
| parent | a8e0d16d85fb2ea53775f64549cac2396cd621a6 (diff) | |
| download | git-a7f051987c5f020e60da1e5d6ddefc3d443d3299.tar.xz | |
Merge branch 'gl/cleanup'
* gl/cleanup:
Convert memset(hash,0,20) to hashclr(hash).
Convert memcpy(a,b,20) to hashcpy(a,b).
Diffstat (limited to 'builtin-diff.c')
| -rw-r--r-- | builtin-diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-diff.c b/builtin-diff.c index 874f773421..a6590205e8 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -192,7 +192,7 @@ static int builtin_diff_combined(struct rev_info *revs, parent = xmalloc(ents * sizeof(*parent)); /* Again, the revs are all reverse */ for (i = 0; i < ents; i++) - memcpy(parent + i, ent[ents - 1 - i].item->sha1, 20); + hashcpy((unsigned char*)parent + i, ent[ents - 1 - i].item->sha1); diff_tree_combined(parent[0], parent + 1, ents - 1, revs->dense_combined_merges, revs); return 0; @@ -290,7 +290,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix) if (obj->type == OBJ_BLOB) { if (2 <= blobs) die("more than two blobs given: '%s'", name); - memcpy(blob[blobs].sha1, obj->sha1, 20); + hashcpy(blob[blobs].sha1, obj->sha1); blob[blobs].name = name; blobs++; continue; |
