Changeset b60c582 in mainline for kernel/genarch/src/ofw/ofw_tree.c


Ignore:
Timestamp:
2009-04-03T08:02:30Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2398ee9
Parents:
9be1d58
Message:

update for string changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/ofw/ofw_tree.c

    r9be1d58 rb60c582  
    6767       
    6868        for (i = 0; i < node->properties; i++) {
    69                 if (strcmp(node->property[i].name, name) == 0)
     69                if (str_cmp(node->property[i].name, name) == 0)
    7070                        return &node->property[i];
    7171        }
     
    110110         */
    111111        for (cur = node->child; cur; cur = cur->peer) {
    112                 if (strcmp(cur->da_name, name) == 0)
     112                if (str_cmp(cur->da_name, name) == 0)
    113113                        return cur;
    114114        }
     
    122122         */
    123123        for (cur = node->child; cur; cur = cur->peer) {
    124                 if (strcmp(ofw_tree_node_name(cur), name) == 0)
     124                if (str_cmp(ofw_tree_node_name(cur), name) == 0)
    125125                        return cur;
    126126        }
     
    147147                if (!prop || !prop->value)
    148148                        continue;
    149                 if (strcmp(prop->value, name) == 0)
     149                if (str_cmp(prop->value, name) == 0)
    150150                        return cur;
    151151        }
     
    204204                if (!prop || !prop->value)
    205205                        continue;
    206                 if (strcmp(prop->value, name) == 0)
     206                if (str_cmp(prop->value, name) == 0)
    207207                        return cur;
    208208        }
     
    230230                if (!prop || !prop->value)
    231231                        continue;
    232                 if (strcmp(prop->value, name) == 0)
     232                if (str_cmp(prop->value, name) == 0)
    233233                        return cur;
    234234        }
     
    253253                return NULL;
    254254       
    255         for (i = 1; i < str_size(path) && node; i = j + 1) {
    256                 for (j = i; j < str_size(path) && path[j] != '/'; j++)
    257                         ;
    258                 if (i == j)     /* skip extra slashes */
     255        for (i = 1; (i < str_size(path)) && (node); i = j + 1) {
     256                for (j = i; (j < str_size(path)) && (path[j] != '/'); j++);
     257               
     258                /* Skip extra slashes */
     259                if (i == j)
    259260                        continue;
    260                        
     261               
    261262                memcpy(buf, &path[i], j - i);
    262                 buf[j - i] = '\0';
     263                buf[j - i] = 0;
    263264                node = ofw_tree_find_child(node, buf);
    264265        }
Note: See TracChangeset for help on using the changeset viewer.