Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440466

Re: [PATCH 2/2] netfilter: add missing macro

From Pablo Neira Ayuso <pablo@netfilter.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] netfilter: add missing macro
Date 2016-07-11 12:50 +0200
Message-ID <rTGWK-5RP-9@gated-at.bofh.it> (permalink)
References <rSGP8-79Y-13@gated-at.bofh.it> <rSGP9-79Y-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 08, 2016 at 05:29:11PM +0100, Eric Engestrom wrote:
> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
> ---
> 
> This can't compile without this macro… Is this header really used by anyone?
> Should it be removed, to avoid bit-rot?

Probably better to define something like:

#define SCTP_BITMAP_LEN         (256 / sizeof (u_int32_t))

and use it consistently all around the code, so we can get rid of
these ARRAY_SIZE() from the uapi header.

> ---
>  include/uapi/linux/netfilter/xt_sctp.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/uapi/linux/netfilter/xt_sctp.h b/include/uapi/linux/netfilter/xt_sctp.h
> index 58ffcfb..e4410db 100644
> --- a/include/uapi/linux/netfilter/xt_sctp.h
> +++ b/include/uapi/linux/netfilter/xt_sctp.h
> @@ -3,6 +3,8 @@
>  
>  #include <linux/types.h>
>  
> +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr)[0])
> +
>  #define XT_SCTP_SRC_PORTS	        0x01
>  #define XT_SCTP_DEST_PORTS	        0x02
>  #define XT_SCTP_CHUNK_TYPES		0x04
> -- 
> 2.9.0
> 

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] libnvdimm: add missing macros Eric Engestrom <eric.engestrom@imgtec.com> - 2016-07-08 18:30 +0200
  [PATCH 2/2] netfilter: add missing macro Eric Engestrom <eric.engestrom@imgtec.com> - 2016-07-08 18:30 +0200
    Re: [PATCH 2/2] netfilter: add missing macro kbuild test robot <lkp@intel.com> - 2016-07-08 19:10 +0200
    Re: [PATCH 2/2] netfilter: add missing macro Pablo Neira Ayuso <pablo@netfilter.org> - 2016-07-11 12:50 +0200
  Re: [PATCH 1/2] libnvdimm: add missing macros Dan Williams <dan.j.williams@intel.com> - 2016-07-08 21:40 +0200

csiph-web