[NETFILTER]: xt_sctp: fix mistake to pass a pointer where array is required
[sfrench/cifs-2.6.git] / include / linux / netfilter / xt_sctp.h
index b157897e7792106842988ba0357600a1497d36c9..dd5a4fd4cfd3c9a2635b891bffed564cf659d66d 100644 (file)
@@ -7,9 +7,6 @@
 
 #define XT_SCTP_VALID_FLAGS            0x07
 
 
 #define XT_SCTP_VALID_FLAGS            0x07
 
-#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0]))
-
-
 struct xt_sctp_flag_info {
        u_int8_t chunktype;
        u_int8_t flag;
 struct xt_sctp_flag_info {
        u_int8_t chunktype;
        u_int8_t flag;
@@ -59,21 +56,21 @@ struct xt_sctp_info {
 #define SCTP_CHUNKMAP_RESET(chunkmap)                          \
        do {                                                    \
                int i;                                          \
 #define SCTP_CHUNKMAP_RESET(chunkmap)                          \
        do {                                                    \
                int i;                                          \
-               for (i = 0; i < ELEMCOUNT(chunkmap); i++)       \
+               for (i = 0; i < ARRAY_SIZE(chunkmap); i++)      \
                        chunkmap[i] = 0;                        \
        } while (0)
 
 #define SCTP_CHUNKMAP_SET_ALL(chunkmap)                        \
        do {                                                    \
                int i;                                          \
                        chunkmap[i] = 0;                        \
        } while (0)
 
 #define SCTP_CHUNKMAP_SET_ALL(chunkmap)                        \
        do {                                                    \
                int i;                                          \
-               for (i = 0; i < ELEMCOUNT(chunkmap); i++)       \
+               for (i = 0; i < ARRAY_SIZE(chunkmap); i++)      \
                        chunkmap[i] = ~0;                       \
        } while (0)
 
 #define SCTP_CHUNKMAP_COPY(destmap, srcmap)                    \
        do {                                                    \
                int i;                                          \
                        chunkmap[i] = ~0;                       \
        } while (0)
 
 #define SCTP_CHUNKMAP_COPY(destmap, srcmap)                    \
        do {                                                    \
                int i;                                          \
-               for (i = 0; i < ELEMCOUNT(chunkmap); i++)       \
+               for (i = 0; i < ARRAY_SIZE(srcmap); i++)        \
                        destmap[i] = srcmap[i];                 \
        } while (0)
 
                        destmap[i] = srcmap[i];                 \
        } while (0)
 
@@ -81,7 +78,7 @@ struct xt_sctp_info {
 ({                                                     \
        int i;                                          \
        int flag = 1;                                   \
 ({                                                     \
        int i;                                          \
        int flag = 1;                                   \
-       for (i = 0; i < ELEMCOUNT(chunkmap); i++) {     \
+       for (i = 0; i < ARRAY_SIZE(chunkmap); i++) {    \
                if (chunkmap[i]) {                      \
                        flag = 0;                       \
                        break;                          \
                if (chunkmap[i]) {                      \
                        flag = 0;                       \
                        break;                          \
@@ -94,7 +91,7 @@ struct xt_sctp_info {
 ({                                                     \
        int i;                                          \
        int flag = 1;                                   \
 ({                                                     \
        int i;                                          \
        int flag = 1;                                   \
-       for (i = 0; i < ELEMCOUNT(chunkmap); i++) {     \
+       for (i = 0; i < ARRAY_SIZE(chunkmap); i++) {    \
                if (chunkmap[i] != ~0) {                \
                        flag = 0;                       \
                                break;                  \
                if (chunkmap[i] != ~0) {                \
                        flag = 0;                       \
                                break;                  \