use more portable SPICE_OFFSETOF instead of offsetof

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-05-15 17:13:16 +01:00
parent e8017dd366
commit 538080da76

View File

@ -442,7 +442,7 @@ uint64_t *stat_add_counter(RedsState *reds, StatNodeRef parent, const char *name
void stat_remove_counter(RedsState *reds, uint64_t *counter)
{
reds_stat_remove(reds, (SpiceStatNode *)(counter - offsetof(SpiceStatNode, value)));
reds_stat_remove(reds, (SpiceStatNode *)(counter - SPICE_OFFSETOF(SpiceStatNode, value)));
}
void stat_update_value(RedsState *reds, uint32_t value)