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 /http-push.c | |
parent | 030b52087f0a4b7b1178d34839868ce438eb2f0e (diff) | |
parent | a8e0d16d85fb2ea53775f64549cac2396cd621a6 (diff) | |
download | git-a7f051987c5f020e60da1e5d6ddefc3d443d3299.tar.gz 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 'http-push.c')
-rw-r--r-- | http-push.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http-push.c b/http-push.c index 7d12f6975..04cb238e9 100644 --- a/http-push.c +++ b/http-push.c @@ -1874,7 +1874,7 @@ static int one_local_ref(const char *refname, const unsigned char *sha1) struct ref *ref; int len = strlen(refname) + 1; ref = xcalloc(1, sizeof(*ref) + len); - memcpy(ref->new_sha1, sha1, 20); + hashcpy(ref->new_sha1, sha1); memcpy(ref->name, refname, len); *local_tail = ref; local_tail = &ref->next; @@ -1909,7 +1909,7 @@ static void one_remote_ref(char *refname) } ref = xcalloc(1, sizeof(*ref) + len); - memcpy(ref->old_sha1, remote_sha1, 20); + hashcpy(ref->old_sha1, remote_sha1); memcpy(ref->name, refname, len); *remote_tail = ref; remote_tail = &ref->next; @@ -2164,7 +2164,7 @@ static void fetch_symref(const char *path, char **symref, unsigned char *sha1) if (*symref != NULL) free(*symref); *symref = NULL; - memset(sha1, 0, 20); + hashclr(sha1); if (buffer.posn == 0) return; @@ -2445,7 +2445,7 @@ int main(int argc, char **argv) continue; } } - memcpy(ref->new_sha1, ref->peer_ref->new_sha1, 20); + hashcpy(ref->new_sha1, ref->peer_ref->new_sha1); if (is_zero_sha1(ref->new_sha1)) { error("cannot happen anymore"); rc = -3; |