openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/bus/config-parser.c
static dbus_bool_t service_dirs_absorb_string_list(DBusList** service_dirs,
                                                   DBusList** dirs,
                                                   BusServiceDirFlags flags)
{
    DBusList* link;

    _dbus_assert(service_dirs != NULL);
    _dbus_assert(dirs != NULL);

    while ((link = _dbus_list_pop_first_link(dirs)))
    {
        char* path = link->data;
        BusConfigServiceDir* dir = bus_config_service_dir_new_take(path, flags);

        if (dir == NULL)
        {
            /* OOM - roll back (this does not need to allocate memory) */
            _dbus_list_prepend_link(service_dirs, link);
            return FALSE;
        }

        /* Ownership of path has been taken by dir */
        link->data = dir;
        service_dirs_append_link_unique_or_free(service_dirs, link);
    }

    _dbus_assert(*dirs == NULL);
    return TRUE;
}
/*
 * Consume links from dirs (a list of paths), converting them into links in
 * service_dirs (a list of unique BusServiceDir).
 *
 * On success, return TRUE. dirs will be empty, and every original entry in
 * dirs will have a corresponding service_dirs entry.
 *
 * On OOM, return FALSE. Each original entry of dirs has either been
 * appended to service_dirs or left in dirs.
 */
Consume links from dirs (a list of paths), converting them into links in
service_dirs (a list of unique BusServiceDir).

On success, return TRUE. dirs will be empty, and every original entry in
dirs will have a corresponding service_dirs entry.

On OOM, return FALSE. Each original entry of dirs has either been
appended to service_dirs or left in dirs.
Consume links from dirs ( a list of paths ) converting them into links in service_dirs ( a list of unique BusServiceDir ) . On success return TRUE . dirs will be empty and every original entry in dirs will have a corresponding service_dirs entry . On OOM return FALSE . Each original entry of dirs has either been appended to service_dirs or left in dirs .
static dbus_bool_t service_dirs_absorb_string_list(DBusList** service_dirs,
                                                   DBusList** dirs,
                                                   BusServiceDirFlags flags)
{
    DBusList* link;
    _dbus_assert(service_dirs != NULL);
    _dbus_assert(dirs != NULL);
    while ((link = _dbus_list_pop_first_link(dirs)))
    {
        char* path = link->data;
        BusConfigServiceDir* dir = bus_config_service_dir_new_take(path, flags);
        if (dir == NULL)
        {
            _dbus_list_prepend_link(service_dirs, link);
            return FALSE;
        }
        link->data = dir;
        service_dirs_append_link_unique_or_free(service_dirs, link);
    }
    _dbus_assert(*dirs == NULL);
    return TRUE;
}
static dbus_bool_t service_dirs_absorb_string_list ( DBusList * * service_dirs , DBusList * * dirs , BusServiceDirFlags flags ) { DBusList * link ; _dbus_assert ( service_dirs != NULL ) ; _dbus_assert ( dirs != NULL ) ; while ( ( link = _dbus_list_pop_first_link ( dirs ) ) ) { char * path = link -> data ; BusConfigServiceDir * dir = bus_config_service_dir_new_take ( path , flags ) ; if ( dir == NULL ) { _dbus_list_prepend_link ( service_dirs , link ) ; return FALSE ; } link -> data = dir ; service_dirs_append_link_unique_or_free ( service_dirs , link ) ; } _dbus_assert ( * dirs == NULL ) ; return TRUE ; }
Consume links from dirs (a list of paths), converting them into links in
 service_dirs (a list of unique BusServiceDir).
Consume links from dirs ( a list of paths ) converting them into links in service_dirs ( a list of unique BusServiceDir ) .
/* OOM - roll back (this does not need to allocate memory) */ /* Ownership of path has been taken by dir */