Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14570
b: refs/heads/master
c: bd4cfb5
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Kaiser authored and David S. Miller committed Nov 21, 2005
1 parent ff8ef44 commit 406b119
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b8f2ff6f4c11fff9c3016b54fa261f522a54b70
refs/heads/master: bd4cfb594bdea00c3920b31bd12f497fc4a2e79c
12 changes: 5 additions & 7 deletions trunk/include/linux/netfilter_ipv4/ipt_sctp.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#define IPT_SCTP_VALID_FLAGS 0x07

#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0]))


struct ipt_sctp_flag_info {
u_int8_t chunktype;
Expand Down Expand Up @@ -59,29 +57,29 @@ struct ipt_sctp_info {
#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; \
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; \
for (i = 0; i < ELEMCOUNT(chunkmap); i++) \
for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \
destmap[i] = srcmap[i]; \
} while (0)

#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \
({ \
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; \
Expand All @@ -94,7 +92,7 @@ struct ipt_sctp_info {
({ \
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; \
Expand Down

0 comments on commit 406b119

Please sign in to comment.