]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t-reftable-pq: make merged_iter_pqueue_check() static
authorChandra Pratap <chandrapratap3519@gmail.com>
Thu, 1 Aug 2024 10:59:45 +0000 (16:29 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Aug 2024 16:07:29 +0000 (09:07 -0700)
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>
reftable/pq.h
t/unit-tests/t-reftable-pq.c

index f796c2317948be2c82aaa15c29b5e9aba1730168..707bd26767bd117dc1aa49a7529adefe95da5b37 100644 (file)
@@ -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);
index a78aba9e71f805646b121d79ce45c5d149ea4218..220e82be19dcbf257352203558f48fabc79870ec 100644 (file)
@@ -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;