object-file.c: use "enum" return type for unpack_loose_header()
commit3b6a8db3b03adb118bfafb90bbc710068dbd6d14
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 1 Oct 2021 09:16:49 +0000 (1 11:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Oct 2021 22:06:00 +0000 (1 15:06 -0700)
tree395cc70b50eaf08cbd321a8fd2a76b9244b298fd
parent01cab9767929c6c3faf4f4ad3b348639655f04fd
object-file.c: use "enum" return type for unpack_loose_header()

In a preceding commit we changed and documented unpack_loose_header()
from its previous behavior of returning any negative value or zero, to
only -1 or 0.

Let's add an "enum unpack_loose_header_result" type and use it for
these return values, and have the compiler assert that we're
exhaustively covering all of them.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
object-file.c
streaming.c