summaryrefslogtreecommitdiffstats
path: root/diff-lib.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 /diff-lib.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 'diff-lib.c')
-rw-r--r--diff-lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 3e4b3b96b7..9edfa92626 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -48,7 +48,7 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)
memcpy(dpath->path, ce->name, path_len);
dpath->path[path_len] = '\0';
dpath->mode = 0;
- memset(dpath->sha1, 0, 20);
+ hashclr(dpath->sha1);
memset(&(dpath->parent[0]), 0,
sizeof(struct combine_diff_parent)*5);
@@ -66,8 +66,7 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)
if (2 <= stage) {
int mode = ntohl(nce->ce_mode);
num_compare_stages++;
- memcpy(dpath->parent[stage-2].sha1,
- nce->sha1, 20);
+ hashcpy(dpath->parent[stage-2].sha1, nce->sha1);
dpath->parent[stage-2].mode =
canon_mode(mode);
dpath->parent[stage-2].status =