]> git.ipfire.org Git - thirdparty/git.git/commit
object-file API: return "void", not "int" from hash_object_file()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 4 Feb 2022 23:48:24 +0000 (00:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 26 Feb 2022 01:16:31 +0000 (17:16 -0800)
commit63e05f90562cc8db5c450dbceeab6677b6e5351f
tree0adc468ae79d514d5eff91b9f77368a82ae40fa4
parentbbea0ddeb9bd9eefe568a9f4456cccf630704d8c
object-file API: return "void", not "int" from hash_object_file()

The hash_object_file() function added in abdc3fc8421 (Add
hash_sha1_file(), 2006-10-14) did not have a meaningful return value,
and it never has.

One was seemingly added to avoid adding braces to the "ret = "
assignments being modified here. Let's instead assign "0" to the "ret"
variables at the beginning of the relevant functions, and have them
return "void".

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