diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-08-06 15:57:59 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-08-06 15:57:59 +0000 |
commit | f28b0e57bd5173215132fed02aa4b284d7cbe26a (patch) | |
tree | 4e4d2f65d82afa18af4e47fe13bd6c3e83b4ba4a /zebra/if_sysctl.c | |
parent | 1f742f21a98f756cea03856849fa2f82f467baf7 (diff) | |
download | quagga-f28b0e57bd5173215132fed02aa4b284d7cbe26a.tar.bz2 quagga-f28b0e57bd5173215132fed02aa4b284d7cbe26a.tar.xz |
[zebra] fix inconsistencies in ifstat_update_* declarations and definitions
2006-08-06 Paul Jakma <paul.jakma@sun.com>
* interface.h: (ifstat_update_proc) declaration should match
ifstat_update_sysctl really, which is to not return status, as
such status is not used anywhere.
* if_{proc,sysctl}.c: Make ifstat_update_* definitions and return values
consistent with each other and their declarations, ie:
(void) (*) (void).
Diffstat (limited to 'zebra/if_sysctl.c')
-rw-r--r-- | zebra/if_sysctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/zebra/if_sysctl.c b/zebra/if_sysctl.c index f1e3dcde..5e809964 100644 --- a/zebra/if_sysctl.c +++ b/zebra/if_sysctl.c @@ -33,8 +33,8 @@ #include "zebra/rt.h" #include "zebra/kernel_socket.h" -int -ifstat_update_sysctl () +void +ifstat_update_sysctl (void) { caddr_t ref, buf, end; size_t bufsiz; @@ -56,7 +56,7 @@ ifstat_update_sysctl () if (sysctl (mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) { zlog_warn ("sysctl() error by %s", safe_strerror (errno)); - return -1; + return; } /* We free this memory at the end of this function. */ @@ -66,7 +66,7 @@ ifstat_update_sysctl () if (sysctl (mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) { zlog (NULL, LOG_WARNING, "sysctl error by %s", safe_strerror (errno)); - return -1; + return; } /* Parse both interfaces and addresses. */ @@ -84,7 +84,7 @@ ifstat_update_sysctl () /* Free sysctl buffer. */ XFREE (MTYPE_TMP, ref); - return 0; + return; } /* Interface listing up function using sysctl(). */ |