Changeset 86ffa27f in mainline for uspace/lib/c/generic/rtld/symbol.c


Ignore:
Timestamp:
2011-08-07T11:21:44Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc574511
Parents:
15f3c3f (diff), e8067c0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/rtld/symbol.c

    r15f3c3f r86ffa27f  
    3838#include <stdlib.h>
    3939
     40#include <elf/elf.h>
    4041#include <rtld/rtld.h>
    4142#include <rtld/rtld_debug.h>
    4243#include <rtld/symbol.h>
    43 #include <elf.h>
    4444
    4545/*
     
    118118        module_t *m, *dm;
    119119        elf_symbol_t *sym, *s;
    120         link_t queue_head;
     120        list_t queue;
    121121        size_t i;
    122122
     
    132132
    133133        /* Insert root (the program) into the queue and tag it */
    134         list_initialize(&queue_head);
     134        list_initialize(&queue);
    135135        start->bfs_tag = true;
    136         list_append(&start->queue_link, &queue_head);
     136        list_append(&start->queue_link, &queue);
    137137
    138138        /* If the symbol is found, it will be stored in 'sym' */
     
    140140
    141141        /* While queue is not empty */
    142         while (!list_empty(&queue_head)) {
     142        while (!list_empty(&queue)) {
    143143                /* Pop first element from the queue */
    144                 m = list_get_instance(queue_head.next, module_t, queue_link);
     144                m = list_get_instance(list_first(&queue), module_t, queue_link);
    145145                list_remove(&m->queue_link);
    146146
     
    162162                        if (dm->bfs_tag == false) {
    163163                                dm->bfs_tag = true;
    164                                 list_append(&dm->queue_link, &queue_head);
     164                                list_append(&dm->queue_link, &queue);
    165165                        }
    166166                }
     
    168168
    169169        /* Empty the queue so that we leave it in a clean state */
    170         while (!list_empty(&queue_head))
    171                 list_remove(queue_head.next);
     170        while (!list_empty(&queue))
     171                list_remove(list_first(&queue));
    172172
    173173        if (!sym) {
Note: See TracChangeset for help on using the changeset viewer.