diff options
Diffstat (limited to 'src/obj/quota.c')
-rw-r--r-- | src/obj/quota.c | 6 |
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("a->bytes, data, sizeof(quota->bytes)); break; case NFTNL_OBJ_QUOTA_CONSUMED: - quota->consumed = *((uint64_t *)data); + memcpy("a->consumed, data, sizeof(quota->consumed)); break; case NFTNL_OBJ_QUOTA_FLAGS: - quota->flags = *((uint32_t *)data); + memcpy("a->flags, data, sizeof(quota->flags)); break; default: return -1; |