diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2011-04-18 09:14:23 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2011-04-18 09:14:23 +0000 |
commit | b6770143c487d53aad673bbe1ad26fc8af1b70b2 (patch) | |
tree | 336b840cadb4cba20b6fc2d386da8229f2de18bd /sys/netgraph | |
parent | 674d86bf9177ff80b5f38f7191951f303a816cac (diff) | |
download | src-b6770143c487d53aad673bbe1ad26fc8af1b70b2.tar.gz src-b6770143c487d53aad673bbe1ad26fc8af1b70b2.zip |
ng_netflow_cache_init() can be void.
Notes
Notes:
svn path=/head/; revision=220769
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/netflow/netflow.c | 4 | ||||
-rw-r--r-- | sys/netgraph/netflow/ng_netflow.c | 5 | ||||
-rw-r--r-- | sys/netgraph/netflow/ng_netflow.h | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index ea1c785e125f..dfbb5075b7a8 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -503,7 +503,7 @@ hash6_insert(priv_p priv, struct flow6_hash_entry *hsh6, struct flow6_rec *r, */ /* 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 */ diff --git a/sys/netgraph/netflow/ng_netflow.c b/sys/netgraph/netflow/ng_netflow.c index 74036fa56ef2..780a12748699 100644 --- a/sys/netgraph/netflow/ng_netflow.c +++ b/sys/netgraph/netflow/ng_netflow.c @@ -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); } diff --git a/sys/netgraph/netflow/ng_netflow.h b/sys/netgraph/netflow/ng_netflow.h index 8119ecce0f4d..66850009a5a4 100644 --- a/sys/netgraph/netflow/ng_netflow.h +++ b/sys/netgraph/netflow/ng_netflow.h @@ -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 *); |