On 31/10/2016 14:10, Halil Pasic wrote:
> I think this got overly complicated.

I agree. :)

> Here is a little patch on
> top of your stuff which gets rid of 15 lines and IMHO simplifies
> things quite a bit.  What do you think? 
> 
> It is based on/inspired by Dave's proposal with the dummy stuff. 
> 
> Did not address the typos though.

I still prefer my field_at_offset proposal, but I'm obviously biased.
Squashing your changes on top of 2/3 is fine too.  But this change makes
little sense:

>   */
>  #define QTAILQ_RAW_NEXT(elm, entry)                                          
>   \
> -        (*field_at_offset(elm, entry + QTAILQ_NEXT_OFFSET, void **))
> +        ((field_at_offset(elm, entry, QTAILQRawEntry *)->tqe_next))
>  #define QTAILQ_RAW_PREV(elm, entry)                                          
>   \
> -        (*field_at_offset(elm, entry + QTAILQ_PREV_OFFSET, void ***))
> +        (field_at_offset(elm, entry, QTAILQRawEntry *)->tqe_prev)
> +

field_at_offset seems to be out of place.

Paolo

Reply via email to