From bb1f78b0976389edbc302ea662b80029cbf5ce5a Mon Sep 17 00:00:00 2001 From: miod <> Date: Mon, 12 May 2014 19:14:14 +0000 Subject: Move the `pqueue' part of libcrypto, which is a glorified sorted linked list of 64-bit data, and only used by DTLS, to libssl where it belongs. Remove pqueue_print() which is a debugging interface and serves no useful purpose, except for the regress test, which grows its own pqueue_print() routine. Bump libcrypto major and libssl minor. WARNING: do not update your tree right now, more changes are coming, which will ride the libcrypto major bump. --- src/regress/lib/libcrypto/pqueue/pq_test.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/regress/lib/libcrypto/pqueue/pq_test.c') diff --git a/src/regress/lib/libcrypto/pqueue/pq_test.c b/src/regress/lib/libcrypto/pqueue/pq_test.c index 32c39cd507..fa78c8fa4c 100644 --- a/src/regress/lib/libcrypto/pqueue/pq_test.c +++ b/src/regress/lib/libcrypto/pqueue/pq_test.c @@ -57,13 +57,29 @@ * */ -#include "pqueue.h" +#include /* remember to change expected.txt if you change these values */ unsigned char prio1[8] = "supercal"; unsigned char prio2[8] = "ifragili"; unsigned char prio3[8] = "sticexpi"; +static void +pqueue_print(pqueue pq) +{ + pitem *iter, *item; + + iter = pqueue_iterator(pq); + for (item = pqueue_next(&iter); item != NULL; + item = pqueue_next(&iter)) { + printf("item\t%02x%02x%02x%02x%02x%02x%02x%02x\n", + item->priority[0], item->priority[1], + item->priority[2], item->priority[3], + item->priority[4], item->priority[5], + item->priority[6], item->priority[7]); + } +} + int main(void) { @@ -82,13 +98,13 @@ main(void) pqueue_insert(pq, item); item = pqueue_find(pq, prio1); - fprintf(stderr, "found %ld\n", item->priority); + fprintf(stderr, "found %p\n", item->priority); item = pqueue_find(pq, prio2); - fprintf(stderr, "found %ld\n", item->priority); + fprintf(stderr, "found %p\n", item->priority); item = pqueue_find(pq, prio3); - fprintf(stderr, "found %ld\n", item ? item->priority: 0); + fprintf(stderr, "found %p\n", item ? item->priority: 0); pqueue_print(pq); -- cgit v1.2.3-55-g6feb