Date: Fri, 19 Aug 2016 08:05:08 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304454 - stable/10/libexec/rtld-elf Message-ID: <201608190805.u7J858Vo006837@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Aug 19 08:05:08 2016 New Revision: 304454 URL: https://svnweb.freebsd.org/changeset/base/304454 Log: MFC r304011: Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf. Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Fri Aug 19 08:00:48 2016 (r304453) +++ stable/10/libexec/rtld-elf/rtld.c Fri Aug 19 08:05:08 2016 (r304454) @@ -2120,8 +2120,7 @@ load_needed_objects(Obj_Entry *first, in { Obj_Entry *obj; - obj = first; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (obj = first; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; if (process_needed(obj, obj->needed, flags) == -1) @@ -2720,9 +2719,8 @@ relocate_objects(Obj_Entry *first, bool Obj_Entry *obj; int error; - error = 0; - obj = first; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (error = 0, obj = first; obj != NULL; + obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; error = relocate_object(obj, bind_now, rtldobj, flags, @@ -2762,8 +2760,7 @@ resolve_objects_ifunc(Obj_Entry *first, { Obj_Entry *obj; - obj = first; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (obj = first; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1) @@ -4213,7 +4210,7 @@ trace_loaded_objects(Obj_Entry *obj) list_containers = getenv(LD_ "TRACE_LOADED_OBJECTS_ALL"); - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (; obj != NULL; obj = TAILQ_NEXT(obj, next)) { Needed_Entry *needed; char *name, *path; bool is_lib; @@ -4557,8 +4554,7 @@ allocate_tls(Obj_Entry *objs, void *oldt */ free_tls(oldtls, 2*sizeof(Elf_Addr), sizeof(Elf_Addr)); } else { - obj = objs; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (obj = objs; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker || obj->tlsoffset == 0) continue; addr = segbase - obj->tlsoffset;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608190805.u7J858Vo006837>