summaryrefslogtreecommitdiff
path: root/builtin-update-ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-update-ref.c')
-rw-r--r--builtin-update-ref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-update-ref.c b/builtin-update-ref.c
index 5bd71825fd..90a3da53ad 100644
--- a/builtin-update-ref.c
+++ b/builtin-update-ref.c
@@ -44,7 +44,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
if (get_sha1(value, sha1))
die("%s: not a valid SHA1", value);
- memset(oldsha1, 0, 20);
+ hashclr(oldsha1);
if (oldval && get_sha1(oldval, oldsha1))
die("%s: not a valid old SHA1", oldval);