diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 14fff2b1c50b730416eae83f160a39e1006b0ec0..b11ca928d6ac353de888f0e80d24578c5803d769 100644 (file)
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
*/
static void *get_obj(const unsigned char *sha1, struct object **obj, unsigned long *sz, int *eaten)
{
- char type[20];
- void *buf = read_sha1_file(sha1, type, sz);
+ enum object_type type;
+ void *buf = read_sha1_file(sha1, &type, sz);
if (buf)
*obj = parse_object_buffer(sha1, type, *sz, buf, eaten);