aboutsummaryrefslogtreecommitdiffstats
path: root/core/table.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/table.h')
-rw-r--r--core/table.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/table.h b/core/table.h
index da0bc96a5..cf0be3bae 100644
--- a/core/table.h
+++ b/core/table.h
@@ -50,13 +50,13 @@
} \
}
-#define MAKE_REMOVE_FROM(table_type, array_name) \
- void remove_from_##table_type(struct table_type *table, int idx) \
- { \
- int i; \
- for (i = idx; i < table->nr - 1; i++) \
- table->array_name[i] = table->array_name[i + 1]; \
- table->array_name[--table->nr] = NULL; \
+#define MAKE_REMOVE_FROM(table_type, array_name) \
+ void remove_from_##table_type(struct table_type *table, int idx) \
+ { \
+ int i; \
+ for (i = idx; i < table->nr - 1; i++) \
+ table->array_name[i] = table->array_name[i + 1]; \
+ memset(&table->array_name[--table->nr], 0, sizeof(table->array_name[0])); \
}
#define MAKE_GET_IDX(table_type, item_type, array_name) \