diff options
Diffstat (limited to 'src/expr/osf.c')
-rw-r--r-- | src/expr/osf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr/osf.c b/src/expr/osf.c index a90620d..0860328 100644 --- a/src/expr/osf.c +++ b/src/expr/osf.c @@ -24,10 +24,10 @@ static int nftnl_expr_osf_set(struct nftnl_expr *e, uint16_t type, switch(type) { case NFTNL_EXPR_OSF_DREG: - osf->dreg = *((uint32_t *)data); + memcpy(&osf->dreg, data, sizeof(osf->dreg)); break; case NFTNL_EXPR_OSF_TTL: - osf->ttl = *((uint8_t *)data); + memcpy(&osf->ttl, data, sizeof(osf->ttl)); break; } return 0; |