Skip to content

Commit

Permalink
[NET]: Use BUILD_BUG_ON in net/core/flowi.c
Browse files Browse the repository at this point in the history
Instead of ugly extern not-existing function.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Oct 24, 2007
1 parent 342709e commit f0fe91d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/core/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ typedef u64 flow_compare_t;
typedef u32 flow_compare_t;
#endif

extern void flowi_is_missized(void);

/* I hear what you're saying, use memcmp. But memcmp cannot make
* important assumptions that we can here, such as alignment and
* constant size.
Expand All @@ -153,8 +151,7 @@ static int flow_key_compare(struct flowi *key1, struct flowi *key2)
flow_compare_t *k1, *k1_lim, *k2;
const int n_elem = sizeof(struct flowi) / sizeof(flow_compare_t);

if (sizeof(struct flowi) % sizeof(flow_compare_t))
flowi_is_missized();
BUILD_BUG_ON(sizeof(struct flowi) % sizeof(flow_compare_t));

k1 = (flow_compare_t *) key1;
k1_lim = k1 + n_elem;
Expand Down

0 comments on commit f0fe91d

Please sign in to comment.