[ulogd2] src: use ARRAY_SIZE to calculate the array size of keys

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Fri Apr 2 14:19:54 CEST 2010


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=ulogd2.git;a=commit;h=72bab144d01649867fcb428518e0f5ad4ea2b6cd
commit 72bab144d01649867fcb428518e0f5ad4ea2b6cd
Author:     Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Tue Jan 26 13:10:40 2010 +0100
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Fri Apr 2 14:17:51 2010 +0200

    src: use ARRAY_SIZE to calculate the array size of keys
    
    This patch is a cleanup to use ARRAY_SIZE in NFLOG and ULOG input
    plugins.
    
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
       via  72bab144d01649867fcb428518e0f5ad4ea2b6cd (commit)
      from  3fff7feb1428e8de1903817127995efd4c60d5ef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 72bab144d01649867fcb428518e0f5ad4ea2b6cd
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date:   Tue Jan 26 13:10:40 2010 +0100

    src: use ARRAY_SIZE to calculate the array size of keys
    
    This patch is a cleanup to use ARRAY_SIZE in NFLOG and ULOG input
    plugins.
    
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

-----------------------------------------------------------------------

 input/packet/ulogd_inppkt_NFLOG.c |    2 +-
 input/packet/ulogd_inppkt_ULOG.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
This patch is a cleanup to use ARRAY_SIZE in NFLOG and ULOG input
plugins.

Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index 4cfcf11..3fd866e 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -635,7 +635,7 @@ struct ulogd_plugin libulog_plugin = {
 	.output = {
 		.type = ULOGD_DTYPE_RAW,
 		.keys = output_keys,
-		.num_keys = sizeof(output_keys)/sizeof(struct ulogd_key),
+		.num_keys = ARRAY_SIZE(output_keys),
 	},
 	.priv_size 	= sizeof(struct nflog_input),
 	.configure 	= &configure,
diff --git a/input/packet/ulogd_inppkt_ULOG.c b/input/packet/ulogd_inppkt_ULOG.c
index 719898d..80bbd5f 100644
--- a/input/packet/ulogd_inppkt_ULOG.c
+++ b/input/packet/ulogd_inppkt_ULOG.c
@@ -323,7 +323,7 @@ struct ulogd_plugin libulog_plugin = {
 	.output = {
 		.type = ULOGD_DTYPE_RAW,
 		.keys = output_keys,
-		.num_keys = sizeof(output_keys)/sizeof(struct ulogd_key),
+		.num_keys = ARRAY_SIZE(output_keys),
 	},
 	.configure = &configure,
 	.start = &init,



More information about the netfilter-cvslog mailing list