Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



On 26 Nov, 2013, at 01:55 , Alan Barrett <apb%cequrux.com@localhost> wrote:
>> -    for (mp = mountlist.cqh_first; mp != (void*)&mountlist; mp = nmp) {
>> -    nmp = mp->mnt_list.cqe_next;
>> +    for (mp = mountlist.tqh_first; mp != (void*)&mountlist; mp = nmp) {
>> +    nmp = mp->mnt_list.tqe_next;
> 
> ... could be rewritten to use TAILQ_FOREACH.

Actually not TAILQ_FOREACH, but TAILQ_FOREACH_SAFE, though the operation
of the latter is obscure enough that one could be forgiven for writing
code that makes what is needed explicit.

For a minimal improvement just TAILQ_FIRST and TAILQ_NEXT would be good.

Dennis Ferguson


Home | Main Index | Thread Index | Old Index