diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-02-05 00:48:24 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-26 02:16:31 +0100 |
commit | 63e05f90562cc8db5c450dbceeab6677b6e5351f (patch) | |
tree | 0adc468ae79d514d5eff91b9f77368a82ae40fa4 /object-store.h | |
parent | object-file.c: split up declaration of unrelated variables (diff) | |
download | git-63e05f90562cc8db5c450dbceeab6677b6e5351f.tar.xz git-63e05f90562cc8db5c450dbceeab6677b6e5351f.zip |
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>
Diffstat (limited to 'object-store.h')
-rw-r--r-- | object-store.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/object-store.h b/object-store.h index 6f89482df0..44f6868cc9 100644 --- a/object-store.h +++ b/object-store.h @@ -245,9 +245,9 @@ static inline void *repo_read_object_file(struct repository *r, /* Read and unpack an object file into memory, write memory to an object file */ int oid_object_info(struct repository *r, const struct object_id *, unsigned long *); -int hash_object_file(const struct git_hash_algo *algo, const void *buf, - unsigned long len, const char *type, - struct object_id *oid); +void hash_object_file(const struct git_hash_algo *algo, const void *buf, + unsigned long len, const char *type, + struct object_id *oid); int write_object_file_flags(const void *buf, unsigned long len, const char *type, struct object_id *oid, |