[PATCH 1/2] list.h: Fix list_for_each_entry_safe()
Kristian Høgsberg
krh at bitplanet.net
Sun Jun 20 18:13:14 PDT 2010
On Fri, Jun 18, 2010 at 5:43 PM, Dan Nicholson <dbn.lists at gmail.com> wrote:
> On Fri, Jun 18, 2010 at 2:34 PM, Keith Packard <keithp at keithp.com> wrote:
>> On Mon, 14 Jun 2010 09:25:22 -0400, Kristian Høgsberg <krh at bitplanet.net> wrote:
>>
>>> - pos = next, next = __container_of(next->member.next, next, member))
>>> + pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
>>
>> Any reason this uses a ',' instead of a ';'?
>
> Because it's the initializer in a for loop. If there was a semicolon,
> it would become the test argument.
Yup, we're doing to assignments in the initializer, separated by the
comma operator.
Kristian
More information about the xorg-devel
mailing list