Remove redundant parameter inherited from ipacctctl.

This commit is contained in:
Gleb Smirnoff 2005-01-18 09:24:32 +00:00
parent e1554781bb
commit f0f77f69d7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140413

View File

@ -1,5 +1,5 @@
/*- /*-
* Copyright (c) 2004 Gleb Smirnoff <glebius@FreeBSD.org> * Copyright (c) 2004, 2005 Gleb Smirnoff <glebius@FreeBSD.org>
* Copyright (c) 2001-2003 Roman V. Palagin <romanp@unshadow.net> * Copyright (c) 2001-2003 Roman V. Palagin <romanp@unshadow.net>
* All rights reserved. * All rights reserved.
* *
@ -58,19 +58,18 @@ static const char rcs_id[] =
int main(int, char **); int main(int, char **);
static int flow_cache_print(struct ngnf_flows *recs); static int flow_cache_print(struct ngnf_flows *recs);
static int ctl_show(int, int, char **); static int ctl_show(int, char **);
static void help(void); static void help(void);
static void execute_command(int, char **); static void execute_command(int, char **);
struct ip_ctl_cmd { struct ip_ctl_cmd {
char *cmd_name; char *cmd_name;
int cmd_code; int (*cmd_func)(int argc, char **argv);
int (*cmd_func)(int code, int argc, char **argv);
}; };
struct ip_ctl_cmd cmds[] = { struct ip_ctl_cmd cmds[] = {
{"show", NGM_NETFLOW_SHOW, ctl_show}, {"show", ctl_show},
{NULL, 0, NULL}, {NULL, NULL},
}; };
int cs; int cs;
@ -146,11 +145,11 @@ execute_command(int argc, char **argv)
errx(1, "bad command: %s", argv[0]); errx(1, "bad command: %s", argv[0]);
argc--; argc--;
argv++; argv++;
(*cmds[cindex].cmd_func)(cmds[cindex].cmd_code, argc, argv); (*cmds[cindex].cmd_func)(argc, argv);
} }
static int static int
ctl_show(int code, int argc, char **argv) ctl_show(int argc, char **argv)
{ {
struct ng_mesg *ng_mesg; struct ng_mesg *ng_mesg;
struct ngnf_flows *data; struct ngnf_flows *data;