Code

Convert memset(hash,0,20) to hashclr(hash).
[git.git] / upload-pack.c
index 27e2abe36c54fbf4ff04a70a64e1985fc4a8cbd0..51ce936b060d34a2f759dba4f7aeeecf47a59a4b 100644 (file)
@@ -14,12 +14,12 @@ static const char upload_pack_usage[] = "git-upload-pack [--strict] [--timeout=n
 #define THEY_HAVE (1U << 0)
 #define OUR_REF (1U << 1)
 #define WANTED (1U << 2)
-static int multi_ack = 0, nr_our_refs = 0;
-static int use_thin_pack = 0;
+static int multi_ack, nr_our_refs;
+static int use_thin_pack;
 static struct object_array have_obj;
 static struct object_array want_obj;
-static unsigned int timeout = 0;
-static int use_sideband = 0;
+static unsigned int timeout;
+static int use_sideband;
 
 static void reset_timeout(void)
 {
@@ -374,7 +374,7 @@ static int get_common_commits(void)
                                             sha1_to_hex(sha1),
                                             multi_ack ?  " continue" : "");
                                if (multi_ack)
-                                       memcpy(last_sha1, sha1, 20);
+                                       hashcpy(last_sha1, sha1);
                        }
                        continue;
                }