Changeset 8b9a443 in mainline


Ignore:
Timestamp:
2012-03-02T14:55:34Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dabbe28
Parents:
76f382b
Message:

cstyle

File:
1 edited

Legend:

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

    r76f382b r8b9a443  
    6565    const char *name)
    6666{
    67         size_t i;
    68        
    69         for (i = 0; i < node->properties; i++) {
     67        for (size_t i = 0; i < node->properties; i++) {
    7068                if (str_cmp(node->property[i].name, name) == 0)
    7169                        return &node->property[i];
     
    104102    const char *name)
    105103{
    106         ofw_tree_node_t *cur;
    107        
    108104        /*
    109105         * Try to find the disambigued name.
    110106         */
    111         for (cur = node->child; cur; cur = cur->peer) {
     107        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    112108                if (str_cmp(cur->da_name, name) == 0)
    113109                        return cur;
     
    121117         * are not always fully-qualified.
    122118         */
    123         for (cur = node->child; cur; cur = cur->peer) {
     119        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    124120                if (str_cmp(ofw_tree_node_name(cur), name) == 0)
    125121                        return cur;
     
    141137    const char *dtype)
    142138{
    143         ofw_tree_node_t *cur;
    144        
    145         for (cur = node->child; cur; cur = cur->peer) {
     139        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    146140                ofw_tree_property_t *prop =
    147141                    ofw_tree_getprop(cur, "device_type");
     
    172166    phandle handle)
    173167{
    174         ofw_tree_node_t *cur;
    175        
    176         for (cur = root; cur; cur = cur->peer) {
     168        for (ofw_tree_node_t *cur = root; cur; cur = cur->peer) {
    177169                if (cur->node_handle == handle)
    178170                        return cur;
    179171               
    180172                if (cur->child) {
    181                         ofw_tree_node_t *node
    182                             = ofw_tree_find_node_by_handle(cur->child, handle);
     173                        ofw_tree_node_t *node =
     174                            ofw_tree_find_node_by_handle(cur->child, handle);
    183175                        if (node)
    184176                                return node;
     
    201193    const char *dtype)
    202194{
    203         ofw_tree_node_t *cur;
    204        
    205         for (cur = node->peer; cur; cur = cur->peer) {
     195        for (ofw_tree_node_t *cur = node->peer; cur; cur = cur->peer) {
    206196                ofw_tree_property_t *prop =
    207197                    ofw_tree_getprop(cur, "device_type");
     
    229219    const char *name)
    230220{
    231         ofw_tree_node_t *cur;
    232        
    233         for (cur = node->peer; cur; cur = cur->peer) {
    234                 ofw_tree_property_t *prop
    235                     = ofw_tree_getprop(cur, "name");
     221        for (ofw_tree_node_t *cur = node->peer; cur; cur = cur->peer) {
     222                ofw_tree_property_t *prop =
     223                    ofw_tree_getprop(cur, "name");
    236224               
    237225                if ((!prop) || (!prop->value))
     
    259247       
    260248        ofw_tree_node_t *node = ofw_root;
    261         size_t i;
    262249        size_t j;
    263250       
    264         for (i = 1; (i < str_size(path)) && (node); i = j + 1) {
     251        for (size_t i = 1; (i < str_size(path)) && (node); i = j + 1) {
    265252                for (j = i; (j < str_size(path)) && (path[j] != '/'); j++);
    266253               
     
    294281    const char *dtype, ofw_tree_walker_t walker, void *arg)
    295282{
    296         ofw_tree_node_t *cur;
    297        
    298         for (cur = node; cur; cur = cur->peer) {
     283        for (ofw_tree_node_t *cur = node; cur; cur = cur->peer) {
    299284                ofw_tree_property_t *prop =
    300285                    ofw_tree_getprop(cur, "device_type");
Note: See TracChangeset for help on using the changeset viewer.