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


Ignore:
Timestamp:
2018-04-13T12:39:06Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
18b6a88
Parents:
f712a85
git-author:
Jiri Svoboda <jiri@…> (2018-04-12 17:38:04)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-13 12:39:06)
Message:

ccheck-fix a few files with for loops.

File:
1 edited

Legend:

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

    rf712a85 r8ebe212  
    106106         * Try to find the disambigued name.
    107107         */
    108         for (ofw_tree_node_t * cur = node->child; cur; cur = cur->peer) {
     108        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    109109                if (str_cmp(cur->da_name, name) == 0)
    110110                        return cur;
     
    118118         * are not always fully-qualified.
    119119         */
    120         for (ofw_tree_node_t * cur = node->child; cur; cur = cur->peer) {
     120        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    121121                if (str_cmp(ofw_tree_node_name(cur), name) == 0)
    122122                        return cur;
     
    138138    const char *dtype)
    139139{
    140         for (ofw_tree_node_t * cur = node->child; cur; cur = cur->peer) {
     140        for (ofw_tree_node_t *cur = node->child; cur; cur = cur->peer) {
    141141                ofw_tree_property_t *prop =
    142142                    ofw_tree_getprop(cur, "device_type");
     
    167167    phandle handle)
    168168{
    169         for (ofw_tree_node_t * cur = root; cur; cur = cur->peer) {
     169        for (ofw_tree_node_t *cur = root; cur; cur = cur->peer) {
    170170                if (cur->node_handle == handle)
    171171                        return cur;
     
    194194    const char *dtype)
    195195{
    196         for (ofw_tree_node_t * cur = node->peer; cur; cur = cur->peer) {
     196        for (ofw_tree_node_t *cur = node->peer; cur; cur = cur->peer) {
    197197                ofw_tree_property_t *prop =
    198198                    ofw_tree_getprop(cur, "device_type");
     
    220220    const char *name)
    221221{
    222         for (ofw_tree_node_t * cur = node->peer; cur; cur = cur->peer) {
     222        for (ofw_tree_node_t *cur = node->peer; cur; cur = cur->peer) {
    223223                ofw_tree_property_t *prop =
    224224                    ofw_tree_getprop(cur, "name");
     
    284284    const char *dtype, ofw_tree_walker_t walker, void *arg)
    285285{
    286         for (ofw_tree_node_t * cur = node; cur; cur = cur->peer) {
     286        for (ofw_tree_node_t *cur = node; cur; cur = cur->peer) {
    287287                ofw_tree_property_t *prop =
    288288                    ofw_tree_getprop(cur, "device_type");
     
    388388        char *cur_path = (char *) malloc(PATH_MAX_LEN, 0);
    389389
    390         for (ofw_tree_node_t * cur = node; cur; cur = cur->peer) {
     390        for (ofw_tree_node_t *cur = node; cur; cur = cur->peer) {
    391391                if ((cur->parent) && (path))
    392392                        snprintf(cur_path, PATH_MAX_LEN, "%s.%s", path, cur->da_name);
Note: See TracChangeset for help on using the changeset viewer.