summaryrefslogtreecommitdiffstats
path: root/src/expr/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/log.c')
-rw-r--r--src/expr/log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/expr/log.c b/src/expr/log.c
index 94e2908..b2c39c1 100644
--- a/src/expr/log.c
+++ b/src/expr/log.c
@@ -33,7 +33,7 @@ static int
nft_rule_expr_log_set(struct nft_rule_expr *e, uint16_t type,
const void *data, size_t data_len)
{
- struct nft_expr_log *log = (struct nft_expr_log *)e->data;
+ struct nft_expr_log *log = nft_expr_data(e);
switch(type) {
case NFT_EXPR_LOG_PREFIX:
@@ -61,7 +61,7 @@ static const void *
nft_rule_expr_log_get(const struct nft_rule_expr *e, uint16_t type,
size_t *data_len)
{
- struct nft_expr_log *log = (struct nft_expr_log *)e->data;
+ struct nft_expr_log *log = nft_expr_data(e);
switch(type) {
case NFT_EXPR_LOG_PREFIX:
@@ -126,7 +126,7 @@ static int nft_rule_expr_log_cb(const struct nlattr *attr, void *data)
static void
nft_rule_expr_log_build(struct nlmsghdr *nlh, struct nft_rule_expr *e)
{
- struct nft_expr_log *log = (struct nft_expr_log *)e->data;
+ struct nft_expr_log *log = nft_expr_data(e);
if (e->flags & (1 << NFT_EXPR_LOG_PREFIX))
mnl_attr_put_str(nlh, NFTA_LOG_PREFIX, log->prefix);
@@ -141,7 +141,7 @@ nft_rule_expr_log_build(struct nlmsghdr *nlh, struct nft_rule_expr *e)
static int
nft_rule_expr_log_parse(struct nft_rule_expr *e, struct nlattr *attr)
{
- struct nft_expr_log *log = (struct nft_expr_log *)e->data;
+ struct nft_expr_log *log = nft_expr_data(e);
struct nlattr *tb[NFTA_LOG_MAX+1] = {};
if (mnl_attr_parse_nested(attr, nft_rule_expr_log_cb, tb) < 0)
@@ -173,7 +173,7 @@ nft_rule_expr_log_parse(struct nft_rule_expr *e, struct nlattr *attr)
static int nft_rule_expr_log_xml_parse(struct nft_rule_expr *e, mxml_node_t *tree)
{
#ifdef XML_PARSING
- struct nft_expr_log *log = (struct nft_expr_log *)e->data;
+ struct nft_expr_log *log = nft_expr_data(e);
mxml_node_t *node = NULL;
uint64_t tmp;
char *endptr;
@@ -235,7 +235,7 @@ static int
nft_rule_expr_log_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, struct nft_rule_expr *e)
{
- struct nft_expr_log *log = (struct nft_expr_log *)e->data;
+ struct nft_expr_log *log = nft_expr_data(e);
switch(type) {
case NFT_RULE_O_DEFAULT: