Skip to content

Commit 2e70744

Browse files
Chandra Pratapgitster
authored andcommitted
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 <[email protected]> Mentored-by: Christian Couder <[email protected]> Signed-off-by: Chandra Pratap <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a08ea27 commit 2e70744

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

reftable/pq.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ struct merged_iter_pqueue {
2222
size_t cap;
2323
};
2424

25-
void merged_iter_pqueue_check(struct merged_iter_pqueue pq);
2625
struct pq_entry merged_iter_pqueue_remove(struct merged_iter_pqueue *pq);
2726
void merged_iter_pqueue_add(struct merged_iter_pqueue *pq, const struct pq_entry *e);
2827
void merged_iter_pqueue_release(struct merged_iter_pqueue *pq);

t/unit-tests/t-reftable-pq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license that can be found in the LICENSE file or at
1010
#include "reftable/constants.h"
1111
#include "reftable/pq.h"
1212

13-
void merged_iter_pqueue_check(struct merged_iter_pqueue pq)
13+
static void merged_iter_pqueue_check(struct merged_iter_pqueue pq)
1414
{
1515
for (size_t i = 1; i < pq.len; i++) {
1616
size_t parent = (i - 1) / 2;

0 commit comments

Comments
 (0)