Message ID | 20170819152420.22563-9-eric@regit.org |
---|---|
State | Changes Requested |
Delegated to: | Pablo Neira |
Headers | show |
On Sat, Aug 19, 2017 at 05:24:10PM +0200, Eric Leblond wrote: > This patch also avoids double definition of global vars. > > Signed-off-by: Eric Leblond <eric@regit.org> > --- > src/libnftables.c | 2 ++ > src/main.c | 6 ------ > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/src/libnftables.c b/src/libnftables.c > index 446ec1e..28f9272 100644 > --- a/src/libnftables.c > +++ b/src/libnftables.c > @@ -33,6 +33,8 @@ unsigned int handle_output; > unsigned int debug_level; > #endif > > +const char *include_paths[INCLUDE_PATHS_MAX] = { DEFAULT_INCLUDE_PATH }; Would you send an initial patch to place this in nft_ctx? Otherwise, we can probably tell Varsha - Outreachy to do this for you. > void nft_global_init(void) > { > mark_table_init(); > diff --git a/src/main.c b/src/main.c > index 9b4e450..7ab01b7 100644 > --- a/src/main.c > +++ b/src/main.c > @@ -29,12 +29,6 @@ > #include <iface.h> > #include <cli.h> > > -unsigned int max_errors = 10; > -#ifdef DEBUG > -unsigned int debug_level; > -#endif These are being removed here, so I guess this is a leftover from previous patch. Anyway, I think these are candidates for the ctx object too, let me have a look if I can send you a quick patch to sort out this. > -const char *include_paths[INCLUDE_PATHS_MAX] = { DEFAULT_INCLUDE_PATH }; > static unsigned int num_include_paths = 1; > > enum opt_vals { > -- > 2.14.1 > -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello, On Mon, 2017-08-21 at 10:27 +0200, Pablo Neira Ayuso wrote: > On Sat, Aug 19, 2017 at 05:24:10PM +0200, Eric Leblond wrote: > > This patch also avoids double definition of global vars. > > > > Signed-off-by: Eric Leblond <eric@regit.org> > > --- > > src/libnftables.c | 2 ++ > > src/main.c | 6 ------ > > 2 files changed, 2 insertions(+), 6 deletions(-) > > > > diff --git a/src/libnftables.c b/src/libnftables.c > > index 446ec1e..28f9272 100644 > > --- a/src/libnftables.c > > +++ b/src/libnftables.c > > @@ -33,6 +33,8 @@ unsigned int handle_output; > > unsigned int debug_level; > > #endif > > > > +const char *include_paths[INCLUDE_PATHS_MAX] = { > > DEFAULT_INCLUDE_PATH }; > > Would you send an initial patch to place this in nft_ctx? > > Otherwise, we can probably tell Varsha - Outreachy to do this for > you. I'm really fine with Varsha taking it! > > > void nft_global_init(void) > > { > > mark_table_init(); > > diff --git a/src/main.c b/src/main.c > > index 9b4e450..7ab01b7 100644 > > --- a/src/main.c > > +++ b/src/main.c > > @@ -29,12 +29,6 @@ > > #include <iface.h> > > #include <cli.h> > > > > -unsigned int max_errors = 10; > > -#ifdef DEBUG > > -unsigned int debug_level; > > -#endif > > These are being removed here, so I guess this is a leftover from > previous patch. > > Anyway, I think these are candidates for the ctx object too, let me > have a look if I can send you a quick patch to sort out this. OK perfect. BR,
diff --git a/src/libnftables.c b/src/libnftables.c index 446ec1e..28f9272 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -33,6 +33,8 @@ unsigned int handle_output; unsigned int debug_level; #endif +const char *include_paths[INCLUDE_PATHS_MAX] = { DEFAULT_INCLUDE_PATH }; + void nft_global_init(void) { mark_table_init(); diff --git a/src/main.c b/src/main.c index 9b4e450..7ab01b7 100644 --- a/src/main.c +++ b/src/main.c @@ -29,12 +29,6 @@ #include <iface.h> #include <cli.h> -unsigned int max_errors = 10; -#ifdef DEBUG -unsigned int debug_level; -#endif - -const char *include_paths[INCLUDE_PATHS_MAX] = { DEFAULT_INCLUDE_PATH }; static unsigned int num_include_paths = 1; enum opt_vals {
This patch also avoids double definition of global vars. Signed-off-by: Eric Leblond <eric@regit.org> --- src/libnftables.c | 2 ++ src/main.c | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-)