Re: [PATCH 1/2 conntrackd] src: add ARRAY_SIZE definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 2018-03-20 12:47, Pablo Neira Ayuso wrote:

>Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
>---
> include/conntrackd.h | 4 ++++
> include/helper.h     | 2 --
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/include/conntrackd.h b/include/conntrackd.h
>index ece702543082..81dff221e96d 100644
>--- a/include/conntrackd.h
>+++ b/include/conntrackd.h
>@@ -308,4 +308,8 @@ void select_main_loop(void);
> int
> init_config(char *filename);
> 
>+#ifndef ARRAY_SIZE
>+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
>+#endif

You probably want to add the array check to ARRAY_SIZE, cf.
https://sourceforge.net/p/libhx/libhx/ci/master/tree/include/libHX/defs.h#l152
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux