-----Original Message-----
From: <owner-src-committ...@freebsd.org> on behalf of Bryan Drewery 
<bdrew...@freebsd.org>
Organization: FreeBSD
Date: 2016-08-16, Tuesday at 03:30
To: Ngie Cooper <yaneurab...@gmail.com>, Konstantin Belousov <k...@freebsd.org>
Cc: <src-committ...@freebsd.org>, <svn-src-...@freebsd.org>, 
<svn-src-head@freebsd.org>
Subject: Re: svn commit: r304011 - head/libexec/rtld-elf

>On 8/12/16 7:34 PM, Ngie Cooper wrote:
>> 
>> ...
>>
>>> Log:
>>>  Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf.
>> 
>> Why?
>> 
> 
> It's a somewhat error-prone and dangerous macro. See r302908.

I'll grant you "error-prone", but why do you consider it "dangerous"? It's 
inefficient to walk the whole list when passing NULL as the starting pointer, 
but I'm not sure what the danger is.

And, if it really *is* dangerous, perhaps we should purge the 
TAILQ_FOREACH_FROM APIs entirely? It looks like rtld-elf was the last (in-tree) 
user:

    [freebsd/base/head] rpokala% grep -rl TAILQ_FOREACH_FROM .
    ./share/man/man3/Makefile
    ./share/man/man3/queue.3
    ./sys/sys/queue.h

I confirmed that queue.h just defines the (S)TAILQ_FOREACH_FROM(_SAFE) macros, 
but doesn't use them internally to define anything else.

-Ravi (rpokala@)

> -- 
> Regards,
> Bryan Drewery 


_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to