Hi Tomasz,

On 03/08/2013 09:09 AM, Tomasz Bursztyka wrote:
Le 07/03/2013 16:45, Daniel Wagner a écrit :
On 03/07/2013 03:33 PM, Patrik Flykt wrote:
On Thu, 2013-03-07 at 14:35 +0100, Daniel Wagner wrote:
Currently, find_chain_tail() returns the element after the chain end.

Let's keep it the old way until there is a real reason to do something
else. If it ain't broken, let's not fix it (yet).

This function is broken. So I fix it. And I disagree with you reasoning.


I don't see a fix here, and afaik this function would be broken not much
code from iptables.c would work, wouldn't it? ;)
You are just changing the signature of find_chain_tail() and if you want
to do so, you should do the same for find_chain_head()

But from semantic point of view: tail and head are words tighten to
list. tail of the list, head of the list. Here you change the stuff then.

Hmm, I had in the impression that the current code does violate this definition. find_chain_tail() returns the element after the chain we are looking at.

And personally I don't see the code much readable before or after.

uuhh, how is

        if (chain_head->next != chain_tail->prev)

more readable then

        if (chain_head->next != chain_tail)

?

But then, I think we are entering the bike shedding discussion. Okay, I drop this one.

cheers,
daniel

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to