summaryrefslogtreecommitdiffstats
path: root/src/table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/table.c')
-rw-r--r--src/table.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/table.c b/src/table.c
index 42fe49f..7eefc70 100644
--- a/src/table.c
+++ b/src/table.c
@@ -87,9 +87,7 @@ static uint32_t nftnl_table_validate[NFTNL_TABLE_MAX + 1] = {
void nftnl_table_set_data(struct nftnl_table *t, uint16_t attr,
const void *data, uint32_t data_len)
{
- if (attr > NFTNL_TABLE_MAX)
- return;
-
+ nftnl_assert_attr_exists(attr, NFTNL_TABLE_MAX);
nftnl_assert_validate(data, nftnl_table_validate, attr, data_len);
switch (attr) {