aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pqueue/pqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pqueue/pqueue.c')
-rw-r--r--crypto/pqueue/pqueue.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/pqueue/pqueue.c b/crypto/pqueue/pqueue.c
index 5cc18527f8da..6c89f06fb105 100644
--- a/crypto/pqueue/pqueue.c
+++ b/crypto/pqueue/pqueue.c
@@ -234,3 +234,17 @@ pqueue_next(pitem **item)
return ret;
}
+
+int
+pqueue_size(pqueue_s *pq)
+{
+ pitem *item = pq->items;
+ int count = 0;
+
+ while(item != NULL)
+ {
+ count++;
+ item = item->next;
+ }
+ return count;
+}