summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-04-22 01:11:17 +0200
committerMichael Haggerty <mhagger@alum.mit.edu>2016-06-13 11:23:49 +0200
commitfa96ea1b883bf83fc488f999c58396bbab1860c1 (patch)
treec5822ad2a5610bc82fcf8b3b43297831c30a0fe3 /refs
parent3a0b6b9aba844075e802a6dc4c24622b34ab535b (diff)
downloadgit-fa96ea1b883bf83fc488f999c58396bbab1860c1.tar.gz
read_raw_ref(): clear *type at start of function
This is more convenient and less error-prone for callers. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 1657ce7512..3c99eef42a 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1430,6 +1430,7 @@ int read_raw_ref(const char *refname, unsigned char *sha1,
int ret = -1;
int save_errno;
+ *type = 0;
strbuf_reset(&sb_path);
strbuf_git_path(&sb_path, "%s", refname);
path = sb_path.buf;