mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
t-reftable-pq: make merged_iter_pqueue_check() static
merged_iter_pqueue_check() is a function previously defined in reftable/pq_test.c (now t/unit-tests/t-reftable-pq.c) and used in the testing of a priority queue as defined by reftable/pq.{c, h}. As such, this function is only called by reftable/pq_test.c and it makes little sense to expose it to non-testing code via reftable/pq.h. Hence, make this function static and remove its prototype from reftable/pq.h. Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a08ea27cd0
commit
2e707447e1
@ -22,7 +22,6 @@ struct merged_iter_pqueue {
|
||||
size_t cap;
|
||||
};
|
||||
|
||||
void merged_iter_pqueue_check(struct merged_iter_pqueue pq);
|
||||
struct pq_entry merged_iter_pqueue_remove(struct merged_iter_pqueue *pq);
|
||||
void merged_iter_pqueue_add(struct merged_iter_pqueue *pq, const struct pq_entry *e);
|
||||
void merged_iter_pqueue_release(struct merged_iter_pqueue *pq);
|
||||
|
@ -10,7 +10,7 @@ https://developers.google.com/open-source/licenses/bsd
|
||||
#include "reftable/constants.h"
|
||||
#include "reftable/pq.h"
|
||||
|
||||
void merged_iter_pqueue_check(struct merged_iter_pqueue pq)
|
||||
static void merged_iter_pqueue_check(struct merged_iter_pqueue pq)
|
||||
{
|
||||
for (size_t i = 1; i < pq.len; i++) {
|
||||
size_t parent = (i - 1) / 2;
|
||||
|
Loading…
Reference in New Issue
Block a user