summaryrefslogtreecommitdiffstats
path: root/src/obj/quota.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/obj/quota.c')
-rw-r--r--src/obj/quota.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/obj/quota.c b/src/obj/quota.c
index b1a3f7e..1914037 100644
--- a/src/obj/quota.c
+++ b/src/obj/quota.c
@@ -28,13 +28,13 @@ static int nftnl_obj_quota_set(struct nftnl_obj *e, uint16_t type,
switch (type) {
case NFTNL_OBJ_QUOTA_BYTES:
- quota->bytes = *((uint64_t *)data);
+ memcpy(&quota->bytes, data, sizeof(quota->bytes));
break;
case NFTNL_OBJ_QUOTA_CONSUMED:
- quota->consumed = *((uint64_t *)data);
+ memcpy(&quota->consumed, data, sizeof(quota->consumed));
break;
case NFTNL_OBJ_QUOTA_FLAGS:
- quota->flags = *((uint32_t *)data);
+ memcpy(&quota->flags, data, sizeof(quota->flags));
break;
default:
return -1;