diff --git a/lib/nghttp2_pq.c b/lib/nghttp2_pq.c index bebccc76..64353acc 100644 --- a/lib/nghttp2_pq.c +++ b/lib/nghttp2_pq.c @@ -29,13 +29,12 @@ #include "nghttp2_helper.h" -int nghttp2_pq_init(nghttp2_pq *pq, nghttp2_less less, nghttp2_mem *mem) { +void nghttp2_pq_init(nghttp2_pq *pq, nghttp2_less less, nghttp2_mem *mem) { pq->mem = mem; pq->capacity = 0; pq->q = NULL; pq->length = 0; pq->less = less; - return 0; } void nghttp2_pq_free(nghttp2_pq *pq) { diff --git a/lib/nghttp2_pq.h b/lib/nghttp2_pq.h index 7b7b7392..c8d90ef2 100644 --- a/lib/nghttp2_pq.h +++ b/lib/nghttp2_pq.h @@ -55,14 +55,8 @@ typedef struct { /* * Initializes priority queue |pq| with compare function |cmp|. - * - * This function returns 0 if it succeeds, or one of the following - * negative error codes: - * - * NGHTTP2_ERR_NOMEM - * Out of memory. */ -int nghttp2_pq_init(nghttp2_pq *pq, nghttp2_less less, nghttp2_mem *mem); +void nghttp2_pq_init(nghttp2_pq *pq, nghttp2_less less, nghttp2_mem *mem); /* * Deallocates any resources allocated for |pq|. The stored items are diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index c7ddbfa1..e6725165 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -595,11 +595,7 @@ static int session_new(nghttp2_session **session_ptr, } } - rv = nghttp2_pq_init(&(*session_ptr)->ob_data, stream_less, mem); - if (rv != 0) { - assert(0); - abort(); - } + nghttp2_pq_init(&(*session_ptr)->ob_data, stream_less, mem); return 0;