diff options
author | paul <paul> | 2005-11-24 15:15:17 +0000 |
---|---|---|
committer | paul <paul> | 2005-11-24 15:15:17 +0000 |
commit | ec1a428343cad343969d569c56acbe6b02ab8f4f (patch) | |
tree | ed693dcea011eccbef34113da3e340ec1290e7b3 /zebra/rtread_sysctl.c | |
parent | b6026073584b855d47a8e2033d2aa3413a3394e9 (diff) |
[zebra] Fix mistake in previous commit and further compile warnings/errors.
2005-11-24 Paul Jakma <paul.jakma@sun.com>
* kernel_socket.h: New header for functions exported to sysctl
methods.
* kernel_socket.c: include previous.
Remove static qualifier from couple of functions which are
used by sysctl methods, incorrectly added in previous commit.
Add a workaround for a bogus gcc warning to the RTA_ macros.
* Makefile.am: Add kernel_socket.h to noinst_HEADERS
* if_sysctl.c: include rt.h and kernel_socket.h and remove
redundant prototypes.
* rtread_sysctl.c: ditto.
(route_read) fix mismatch of return values.
* {rt,zserv,rib}.h: Include lib headers depended on.
Diffstat (limited to 'zebra/rtread_sysctl.c')
-rw-r--r-- | zebra/rtread_sysctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/rtread_sysctl.c b/zebra/rtread_sysctl.c index e39d8cb1..88527b37 100644 --- a/zebra/rtread_sysctl.c +++ b/zebra/rtread_sysctl.c @@ -27,6 +27,7 @@ #include "zebra/zserv.h" #include "zebra/rt.h" +#include "zebra/kernel_socket.h" /* Kernel routing table read up by sysctl function. */ void @@ -35,7 +36,6 @@ route_read (void) caddr_t buf, end, ref; size_t bufsiz; struct rt_msghdr *rtm; - void rtm_read (struct rt_msghdr *); #define MIBSIZ 6 int mib[MIBSIZ] = @@ -52,7 +52,7 @@ route_read (void) if (sysctl (mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) { zlog_warn ("sysctl fail: %s", safe_strerror (errno)); - return -1; + return; } /* Allocate buffer. */ @@ -62,7 +62,7 @@ route_read (void) if (sysctl (mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) { zlog_warn ("sysctl() fail by %s", safe_strerror (errno)); - return -1; + return; } for (end = buf + bufsiz; buf < end; buf += rtm->rtm_msglen) @@ -74,5 +74,5 @@ route_read (void) /* Free buffer. */ XFREE (MTYPE_TMP, ref); - return 0; + return; } |