diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-11-19 14:07:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-11-21 04:06:15 +0100 |
commit | 9c5f3ee3b3a04182cc22630e9eb9fad95bd57fd7 (patch) | |
tree | c31a4d9625a82b1ede09040d520fb5ef1a6f37c1 /read-cache.c | |
parent | cocci & cache.h: remove rarely used "the_index" compat macros (diff) | |
download | git-9c5f3ee3b3a04182cc22630e9eb9fad95bd57fd7.tar.xz git-9c5f3ee3b3a04182cc22630e9eb9fad95bd57fd7.zip |
read-cache API & users: make discard_index() return void
The discard_index() function has not returned non-zero since
7a51ed66f65 (Make on-disk index representation separate from in-core
one, 2008-01-14), but we've had various code in-tree still acting as
though that might be the case.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/read-cache.c b/read-cache.c index 3202402927..46f5e497b1 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2531,7 +2531,7 @@ int is_index_unborn(struct index_state *istate) return (!istate->cache_nr && !istate->timestamp.sec); } -int discard_index(struct index_state *istate) +void discard_index(struct index_state *istate) { /* * Cache entries in istate->cache[] should have been allocated @@ -2562,8 +2562,6 @@ int discard_index(struct index_state *istate) mem_pool_discard(istate->ce_mem_pool, should_validate_cache_entries()); FREE_AND_NULL(istate->ce_mem_pool); } - - return 0; } /* |