diff options
Diffstat (limited to 'crypto/pqueue/pqueue.c')
-rw-r--r-- | crypto/pqueue/pqueue.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/pqueue/pqueue.c b/crypto/pqueue/pqueue.c index c20bc6fc96..99a6fb874d 100644 --- a/crypto/pqueue/pqueue.c +++ b/crypto/pqueue/pqueue.c @@ -237,3 +237,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; +} |