From 71f70d3066d1c038e1794c4ffe804591eda3d1af Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Mon, 21 Jan 2008 03:11:12 +0000 Subject: de K&Rify --- zhm/queue.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'zhm/queue.c') diff --git a/zhm/queue.c b/zhm/queue.c index 5a072aa..27e7ca2 100644 --- a/zhm/queue.c +++ b/zhm/queue.c @@ -30,17 +30,18 @@ typedef struct _Queue { static Queue *hm_queue; static int retransmits_enabled = 0; -static Queue *find_notice_in_queue __P((ZNotice_t *notice)); -static Code_t dump_queue __P((void)); -static void queue_timeout __P((void *arg)); +static Queue *find_notice_in_queue(ZNotice_t *notice); +static Code_t dump_queue(void); +static void queue_timeout(void *arg); int rexmit_times[] = { 2, 2, 4, 4, 8, -1 }; #ifdef DEBUG -Code_t dump_queue(); +Code_t dump_queue(void); #endif -void init_queue() +void +init_queue(void) { Queue *q; @@ -56,11 +57,11 @@ void init_queue() DPR("Queue initialized and flushed.\n"); } -Code_t add_notice_to_queue(notice, packet, repl, len) - ZNotice_t *notice; - char * packet; - struct sockaddr_in *repl; - int len; +Code_t +add_notice_to_queue(ZNotice_t *notice, + char *packet, + struct sockaddr_in *repl, + int len) { Queue *entry; @@ -89,10 +90,10 @@ Code_t add_notice_to_queue(notice, packet, repl, len) return(ZERR_NONE); } -Code_t remove_notice_from_queue(notice, kind, repl) - ZNotice_t *notice; - ZNotice_Kind_t *kind; - struct sockaddr_in *repl; +Code_t +remove_notice_from_queue(ZNotice_t *notice, + ZNotice_Kind_t *kind, + struct sockaddr_in *repl) { Queue *entry; @@ -115,8 +116,8 @@ Code_t remove_notice_from_queue(notice, kind, repl) } /* We have a server; transmit all of our packets. */ -void retransmit_queue(sin) - struct sockaddr_in *sin; +void +retransmit_queue(struct sockaddr_in *sin) { Queue *entry; Code_t ret; @@ -148,7 +149,8 @@ void retransmit_queue(sin) } /* We lost our server; nuke all of our timers. */ -void disable_queue_retransmits() +void +disable_queue_retransmits(void) { Queue *entry; @@ -161,7 +163,8 @@ void disable_queue_retransmits() } #ifdef DEBUG -static Code_t dump_queue() +static Code_t +dump_queue(void) { Queue *entry; caddr_t mp; @@ -193,7 +196,8 @@ static Code_t dump_queue() } #endif /* DEBUG */ -int queue_len() +int +queue_len(void) { int length = 0; Queue *entry; @@ -203,8 +207,8 @@ int queue_len() return length; } -static Queue *find_notice_in_queue(notice) - ZNotice_t *notice; +static Queue * +find_notice_in_queue(ZNotice_t *notice) { Queue *entry; @@ -215,8 +219,8 @@ static Queue *find_notice_in_queue(notice) return NULL; } -static void queue_timeout(arg) - void *arg; +static void +queue_timeout(void *arg) { Queue *entry = (Queue *) arg; Code_t ret; -- cgit v1.2.3