From 282997f21e6d40c840433128b198a19e9fdf41fb Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Mon, 7 Jun 2004 10:00:29 +0000 Subject: Some new warnings eliminated. --- sysdep/bsd/krt-sock.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'sysdep/bsd/krt-sock.c') diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index b315d5a3..806bd2bd 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -217,6 +217,20 @@ krt_set_notify(struct krt_proto *p UNUSED, net *net UNUSED, rte *new, rte *old) } } +static int +krt_set_hook(sock *sk, int size UNUSED) +{ + struct ks_msg msg; + int l = read(sk->fd, (char *)&msg, sizeof(msg)); + + if(l <= 0) + log(L_ERR "krt-sock: read failed"); + else + krt_read_msg((struct proto *)sk->data, &msg, 0); + + return 0; +} + void krt_set_start(struct krt_proto *x, int first UNUSED) { @@ -242,21 +256,7 @@ krt_set_start(struct krt_proto *x, int first UNUSED) bug("krt-sock: sk_open failed"); } -static int -krt_set_hook(sock *sk, int size UNUSED) -{ - struct ks_msg msg; - int l = read(sk->fd, (char *)&msg, sizeof(msg)); - - if(l <= 0) - log(L_ERR "krt-sock: read failed"); - else - krt_read_msg((struct proto *)sk->data, &msg, 0); - - return 0; -} - -void +static void krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan) { sockaddr gate, mask, dst; @@ -386,7 +386,7 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan) krt_got_route_async(p, e, new); } -void +static void krt_read_ifinfo(struct ks_msg *msg) { struct if_msghdr *ifm = (struct if_msghdr *)&msg->rtm; @@ -452,7 +452,7 @@ krt_read_ifinfo(struct ks_msg *msg) if_update(&f); /* Just if something happens */ } -void +static void krt_read_addr(struct ks_msg *msg) { struct ifa_msghdr *ifam = (struct ifa_msghdr *)&msg->rtm; @@ -573,7 +573,7 @@ krt_scan_shutdown(struct krt_proto *x UNUSED, int last UNUSED) { } -void +static void krt_sysctl_scan(struct proto *p, pool *pool, byte **buf, int *bl, int cmd) { byte *next; -- cgit v1.2.3