Date: Tue, 16 Aug 2016 08:32:43 -0700 From: Ravi Pokala <rpokala@mac.com> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r304011 - head/libexec/rtld-elf Message-ID: <457F4AE9-A909-44C9-A38B-CD8C28E3068F@panasas.com> In-Reply-To: <a2ebc6e1-7285-94cc-571a-b84de07d2c6e@FreeBSD.org> References: <201608121829.u7CITCIu059447@repo.freebsd.org> <35B0B56E-A536-4A07-B397-7E5ABAB4CB34@gmail.com> <a2ebc6e1-7285-94cc-571a-b84de07d2c6e@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message----- From: <owner-src-committers@freebsd.org> on behalf of Bryan Drewery <bdrewery@FreeBSD.org> Organization: FreeBSD Date: 2016-08-16, Tuesday at 03:30 To: Ngie Cooper <yaneurabeya@gmail.com>, Konstantin Belousov <kib@FreeBSD.org> Cc: <src-committers@freebsd.org>, <svn-src-all@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?457F4AE9-A909-44C9-A38B-CD8C28E3068F>