On Tue, Aug 14, 2012 at 04:14:11PM +0200, Benoît Canet wrote:
> +#define QUORUM_FREE_QIOV_ITEMS(qlist) do {                  \
> +        QLIST_FOREACH_SAFE(item, qlist, next, next_item) { \
> +        QLIST_REMOVE(item, next);                          \
> +        g_free(item);                                   \
> +    } } while (0)

This is only used once, please open code it and don't use a macro.

> +
> +static void quorum_free_vote_list(QuorumAIOCB *acb)
> +{
> +    QuorumIOVectorVersion *version, *next_version;
> +    QuorumIOVectorItem *item, *next_item;
> +
> +    QLIST_FOREACH_SAFE(version, &acb->vote_list, next, next_version) {
> +        QLIST_REMOVE(version, next);
> +        QUORUM_FREE_QIOV_ITEMS(&version->qiov_items);
> +        g_free(version);
> +    }
> +}
> +
> +#undef QUORUM_FREE_QIOV_ITEMS


Reply via email to