Skip to content

Commit

Permalink
the stats handler functions don't take any arguments; make this explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
stspdotname committed Oct 28, 2024
1 parent aeb312d commit 172f4d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static struct fpf {
static struct stt {
char *name;
char *help;
void (*handler) ();
void (*handler)(void);
} stts[] = {
{ "ip", "Internet Protocol", ip_stats },
{ "ah", "Authentication Header", ah_stats },
Expand Down
24 changes: 12 additions & 12 deletions stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void inet6print(struct in6_addr *, int, char *, int);
* Dump TCP statistics structure.
*/
void
tcp_stats()
tcp_stats(void)
{
struct tcpstat tcpstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_TCP, TCPCTL_STATS };
Expand Down Expand Up @@ -222,7 +222,7 @@ tcp_stats()
* Dump UDP statistics structure.
*/
void
udp_stats()
udp_stats(void)
{
struct udpstat udpstat;
u_long delivered;
Expand Down Expand Up @@ -270,7 +270,7 @@ udp_stats()
* Dump IP statistics structure.
*/
void
ip_stats()
ip_stats(void)
{
struct ipstat ipstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_IP, IPCTL_STATS };
Expand Down Expand Up @@ -373,7 +373,7 @@ static char *icmpnames[ICMP_MAXTYPE + 1] = {
* Dump ICMP statistics.
*/
void
icmp_stats()
icmp_stats(void)
{
struct icmpstat icmpstat;
int i, first;
Expand Down Expand Up @@ -430,7 +430,7 @@ icmp_stats()
* Dump IGMP statistics structure.
*/
void
igmp_stats()
igmp_stats(void)
{
struct igmpstat igmpstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_IGMP, IGMPCTL_STATS };
Expand Down Expand Up @@ -465,7 +465,7 @@ igmp_stats()
* Dump AH statistics structure.
*/
void
ah_stats()
ah_stats(void)
{
struct ahstat ahstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_AH, AHCTL_STATS };
Expand Down Expand Up @@ -511,7 +511,7 @@ ah_stats()
* Dump ESP statistics structure.
*/
void
esp_stats()
esp_stats(void)
{
struct espstat espstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_ESP, ESPCTL_STATS };
Expand Down Expand Up @@ -558,7 +558,7 @@ esp_stats()
* Dump IP-in-IP statistics structure.
*/
void
ipip_stats()
ipip_stats(void)
{
struct ipipstat ipipstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_IPIP, IPIPCTL_STATS };
Expand Down Expand Up @@ -592,7 +592,7 @@ ipip_stats()
* Dump CARP statistics structure.
*/
void
carp_stats()
carp_stats(void)
{
struct carpstats carpstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_CARP, CARPCTL_STATS };
Expand Down Expand Up @@ -633,7 +633,7 @@ carp_stats()
* Dump pfsync statistics structure.
*/
void
pfsync_stats()
pfsync_stats(void)
{
struct pfsyncstats pfsyncstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_PFSYNC, PFSYNCCTL_STATS };
Expand Down Expand Up @@ -674,7 +674,7 @@ pfsync_stats()
* Dump IPCOMP statistics structure.
*/
void
ipcomp_stats()
ipcomp_stats(void)
{
struct ipcompstat ipcompstat;
int mib[] = { CTL_NET, AF_INET, IPPROTO_IPCOMP, IPCOMPCTL_STATS };
Expand Down Expand Up @@ -715,7 +715,7 @@ ipcomp_stats()
* Print routing statistics
*/
void
rt_stats()
rt_stats(void)
{
struct rtstat rtstat;
int mib[] = { CTL_NET, PF_ROUTE, 0, 0, NET_RT_STATS, 0 };
Expand Down

0 comments on commit 172f4d2

Please sign in to comment.