From a2a072eb23b0d0167bf573625ce41a65fe135afd Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Mon, 26 Oct 1998 23:08:23 +0000 Subject: [PATCH] use proper isc result type --- lib/isc/heap.c | 4 ++-- lib/isc/include/isc/heap.h | 4 ++-- lib/isc/timer.c | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/isc/heap.c b/lib/isc/heap.c index 4c11ddbcc7..fce8e3ceab 100644 --- a/lib/isc/heap.c +++ b/lib/isc/heap.c @@ -56,7 +56,7 @@ struct isc_heap { isc_heapindex_t index; }; -isc_result +isc_result_t isc_heap_create(isc_memctx_t mctx, isc_heapcompare_t compare, isc_heapindex_t index, unsigned int size_increment, isc_heap_t *heapp) @@ -165,7 +165,7 @@ sink_down(isc_heap_t heap, unsigned int i, void *elt) { (heap->index)(heap->array[i], i); } -isc_result +isc_result_t isc_heap_insert(isc_heap_t heap, void *elt) { unsigned int i; diff --git a/lib/isc/include/isc/heap.h b/lib/isc/include/isc/heap.h index 6b01d5a84e..06171db7b5 100644 --- a/lib/isc/include/isc/heap.h +++ b/lib/isc/include/isc/heap.h @@ -39,10 +39,10 @@ typedef struct isc_heap *isc_heap_t; #define isc_heap_element __isc_heap_element #define isc_heap_foreach __isc_heap_foreach -isc_result isc_heap_create(isc_memctx_t, isc_heapcompare_t, +isc_result_t isc_heap_create(isc_memctx_t, isc_heapcompare_t, isc_heapindex_t, unsigned int, isc_heap_t *); void isc_heap_destroy(isc_heap_t *); -isc_result isc_heap_insert(isc_heap_t, void *); +isc_result_t isc_heap_insert(isc_heap_t, void *); void isc_heap_delete(isc_heap_t, unsigned int); void isc_heap_increased(isc_heap_t, unsigned int); void isc_heap_decreased(isc_heap_t, unsigned int); diff --git a/lib/isc/timer.c b/lib/isc/timer.c index 94dcd9cb2d..babe9d5eaa 100644 --- a/lib/isc/timer.c +++ b/lib/isc/timer.c @@ -89,9 +89,9 @@ struct isc_timermgr { isc_heap_t heap; }; -static inline isc_result +static inline isc_result_t schedule(isc_timer_t timer, isc_time_t now, isc_boolean_t signal_ok) { - isc_result result; + isc_result_t result; isc_timermgr_t manager; struct isc_time due; int cmp; @@ -209,14 +209,14 @@ destroy(isc_timer_t timer) { isc_mem_put(manager->mctx, timer, sizeof *timer); } -isc_result +isc_result_t isc_timer_create(isc_timermgr_t manager, isc_timertype_t type, isc_time_t expires, isc_interval_t interval, isc_task_t task, isc_taskaction_t action, void *arg, isc_timer_t *timerp) { isc_timer_t timer; - isc_result result; + isc_result_t result; struct isc_time now; /* @@ -288,14 +288,14 @@ isc_timer_create(isc_timermgr_t manager, isc_timertype_t type, return (result); } -isc_result +isc_result_t isc_timer_reset(isc_timer_t timer, isc_timertype_t type, isc_time_t expires, isc_interval_t interval, isc_boolean_t purge) { struct isc_time now; isc_timermgr_t manager; - isc_result result; + isc_result_t result; /* * Change the timer's type, expires, and interval values to the given @@ -341,9 +341,9 @@ isc_timer_reset(isc_timer_t timer, isc_timertype_t type, return (result); } -isc_result +isc_result_t isc_timer_touch(isc_timer_t timer) { - isc_result result; + isc_result_t result; struct isc_time now; /* @@ -418,7 +418,7 @@ dispatch(isc_timermgr_t manager, isc_time_t now) { isc_event_t event; isc_eventtype_t type = 0; isc_timer_t timer; - isc_result result; + isc_result_t result; while (manager->nscheduled > 0 && !done) { timer = isc_heap_element(manager->heap, 1); @@ -540,10 +540,10 @@ set_index(void *what, unsigned int index) { timer->index = index; } -isc_result +isc_result_t isc_timermgr_create(isc_memctx_t mctx, isc_timermgr_t *managerp) { isc_timermgr_t manager; - isc_result result; + isc_result_t result; /* * Create a timer manager.