diff options
author | kib <kib@FreeBSD.org> | 2016-08-19 07:57:43 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-08-19 07:57:43 +0000 |
commit | 9eeb002e72b81e4ea34697f082f31b065d7ad43c (patch) | |
tree | c0064ef59dbd25d5acf658152979f5ba33707f5a /libexec | |
parent | 114511e92fb02568c64b3d93e882375b385b8ca3 (diff) | |
download | FreeBSD-src-9eeb002e72b81e4ea34697f082f31b065d7ad43c.zip FreeBSD-src-9eeb002e72b81e4ea34697f082f31b065d7ad43c.tar.gz |
MFC r304011:
Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rtld-elf/rtld.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index ca722cf..01beeb8 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2164,8 +2164,7 @@ load_needed_objects(Obj_Entry *first, int flags) { 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) @@ -2769,9 +2768,8 @@ relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, 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, @@ -2811,8 +2809,7 @@ resolve_objects_ifunc(Obj_Entry *first, bool bind_now, int flags, { 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) @@ -4316,7 +4313,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; @@ -4661,8 +4658,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) */ 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; |