svn commit: r220769 - head/sys/netgraph/netflow
Gleb Smirnoff
glebius at FreeBSD.org
Mon Apr 18 09:14:24 UTC 2011
Author: glebius
Date: Mon Apr 18 09:14:23 2011
New Revision: 220769
URL: http://svn.freebsd.org/changeset/base/220769
Log:
ng_netflow_cache_init() can be void.
Modified:
head/sys/netgraph/netflow/netflow.c
head/sys/netgraph/netflow/ng_netflow.c
head/sys/netgraph/netflow/ng_netflow.h
Modified: head/sys/netgraph/netflow/netflow.c
==============================================================================
--- head/sys/netgraph/netflow/netflow.c Mon Apr 18 09:12:27 2011 (r220768)
+++ head/sys/netgraph/netflow/netflow.c Mon Apr 18 09:14:23 2011 (r220769)
@@ -503,7 +503,7 @@ hash6_insert(priv_p priv, struct flow6_h
*/
/* Allocate memory and set up flow cache */
-int
+void
ng_netflow_cache_init(priv_p priv)
{
struct flow_hash_entry *hsh;
@@ -546,8 +546,6 @@ ng_netflow_cache_init(priv_p priv)
ng_netflow_v9_cache_init(priv);
CTR0(KTR_NET, "ng_netflow startup()");
-
- return (0);
}
/* Initialize new FIB table for v5 and v9 */
Modified: head/sys/netgraph/netflow/ng_netflow.c
==============================================================================
--- head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:12:27 2011 (r220768)
+++ head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:14:23 2011 (r220769)
@@ -220,7 +220,7 @@ static int
ng_netflow_constructor(node_p node)
{
priv_p priv;
- int error = 0, i;
+ int i;
/* Initialize private data */
priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO);
@@ -241,8 +241,7 @@ ng_netflow_constructor(node_p node)
callout_init(&priv->exp_callout, CALLOUT_MPSAFE);
/* Allocate memory and set up flow cache */
- if ((error = ng_netflow_cache_init(priv)))
- return (error);
+ ng_netflow_cache_init(priv);
return (0);
}
Modified: head/sys/netgraph/netflow/ng_netflow.h
==============================================================================
--- head/sys/netgraph/netflow/ng_netflow.h Mon Apr 18 09:12:27 2011 (r220768)
+++ head/sys/netgraph/netflow/ng_netflow.h Mon Apr 18 09:14:23 2011 (r220769)
@@ -458,7 +458,7 @@ struct flow6_hash_entry {
((t) << 3)) /* 8 */
/* Prototypes for netflow.c */
-int ng_netflow_cache_init(priv_p);
+void ng_netflow_cache_init(priv_p);
void ng_netflow_cache_flush(priv_p);
int ng_netflow_fib_init(priv_p priv, int fib);
void ng_netflow_copyinfo(priv_p, struct ng_netflow_info *);
More information about the svn-src-all
mailing list