summaryrefslogtreecommitdiffstats
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-26 10:06:22 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-26 10:06:22 +0200
commita7f051987c5f020e60da1e5d6ddefc3d443d3299 (patch)
treead35bcb194fce5509db30e12b499920b01ccc930 /builtin-pack-objects.c
parentgitweb: git_annotate didn't expect negative numeric timezone (diff)
parentConvert memset(hash,0,20) to hashclr(hash). (diff)
downloadgit-a7f051987c5f020e60da1e5d6ddefc3d443d3299.tar.xz
git-a7f051987c5f020e60da1e5d6ddefc3d443d3299.zip
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-pack-objects.c')
-rw-r--r--builtin-pack-objects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index f19f0d6046..46f524dfc3 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -534,7 +534,7 @@ static int add_object_entry(const unsigned char *sha1, unsigned hash, int exclud
entry = objects + idx;
nr_objects = idx + 1;
memset(entry, 0, sizeof(*entry));
- memcpy(entry->sha1, sha1, 20);
+ hashcpy(entry->sha1, sha1);
entry->hash = hash;
if (object_ix_hashsz * 3 <= nr_objects * 4)
@@ -649,7 +649,7 @@ static struct pbase_tree_cache *pbase_tree_get(const unsigned char *sha1)
free(ent->tree_data);
nent = ent;
}
- memcpy(nent->sha1, sha1, 20);
+ hashcpy(nent->sha1, sha1);
nent->tree_data = data;
nent->tree_size = size;
nent->ref = 1;
@@ -799,7 +799,7 @@ static void add_preferred_base(unsigned char *sha1)
it->next = pbase_tree;
pbase_tree = it;
- memcpy(it->pcache.sha1, tree_sha1, 20);
+ hashcpy(it->pcache.sha1, tree_sha1);
it->pcache.tree_data = data;
it->pcache.tree_size = size;
}