path: root/src/object.c
diff options
authorPhil Sutter <>2019-10-30 18:31:59 +0100
committerPhil Sutter <>2019-10-31 14:57:08 +0100
commit7349a70634fa02838aea33be0ff1b5491ac8dee9 (patch)
treec73d2368cc72cfca021f89d0c143daa869604d93 /src/object.c
parent3c1a1779cb0d2725521e8411903d37b1aebd956c (diff)
Deprecate untyped data setters
These functions make assumptions on size of passed data pointer and therefore tend to hide programming mistakes. Instead either one of the type-specific setters or the generic *_set_data() setter should be used. Signed-off-by: Phil Sutter <> Acked-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/object.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object.c b/src/object.c
index ed8e36d..c876add 100644
--- a/src/object.c
+++ b/src/object.c
@@ -112,7 +112,7 @@ void nftnl_obj_set_data(struct nftnl_obj *obj, uint16_t attr,
obj->flags |= (1 << attr);
+void nftnl_obj_set(struct nftnl_obj *obj, uint16_t attr, const void *data) __visible;
void nftnl_obj_set(struct nftnl_obj *obj, uint16_t attr, const void *data)
nftnl_obj_set_data(obj, attr, data, nftnl_obj_validate[attr]);