From e20f7ccd9e110fcd5deb945f8d23922efd8b0822 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Tue, 29 Mar 2011 00:29:35 +0100 Subject: Bring "ex" version up to date with 0.99.18 Release: 0.99.18ex14 Also fixes issue with unknown attributes -- does not release them prematurely. Contains the "bgpd: New show commands for improved view and address family support", which is post 0.99.18. (But not RFC 5082 GTSM.) --- lib/vector.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/vector.c') diff --git a/lib/vector.c b/lib/vector.c index 646f19a5..83f289fe 100644 --- a/lib/vector.c +++ b/lib/vector.c @@ -987,7 +987,8 @@ vector_bsearch(vector v, vector_bsearch_cmp* cmp, const void* p_val, if (v->end <= 1) { - *result = (v->end == 0) ? -1 : cmp(&p_val, (const void**)&v->p_items[0]) ; + *result = (v->end == 0) ? -1 : + cmp(&p_val, (const void* const*)&v->p_items[0]) ; return 0 ; /* Stop dead if 0 or 1 items */ } ; @@ -996,12 +997,12 @@ vector_bsearch(vector v, vector_bsearch_cmp* cmp, const void* p_val, ih = v->end - 1 ; /* Pick off the edge cases: >= last and <= first. */ - if ((c = cmp(&p_val, (const void**)&v->p_items[ih])) >= 0) + if ((c = cmp(&p_val, (const void* const*)&v->p_items[ih])) >= 0) { *result = c ; /* 0 => found. +1 => val > last */ return ih ; /* return high index. */ } ; - if ((c = cmp(&p_val, (const void**)&v->p_items[il])) <= 0) + if ((c = cmp(&p_val, (const void* const*)&v->p_items[il])) <= 0) { *result = c ; /* 0 => found. -1 => val < first */ return il ; /* return low index. */ @@ -1018,7 +1019,7 @@ vector_bsearch(vector v, vector_bsearch_cmp* cmp, const void* p_val, return il ; /* return il: item[il] < val < item[il+1] */ } ; /* We now know that il < iv < ih */ - c = cmp(&p_val, (const void**)&v->p_items[iv]) ; + c = cmp(&p_val, (const void* const*)&v->p_items[iv]) ; if (c == 0) { *result = 0 ; -- cgit v1.2.3