Changeset 0ddfe029 in rtems


Ignore:
Timestamp:
Feb 12, 2016, 5:45:12 AM (4 years ago)
Author:
Masahiro Yamada <yamada.masahiro@…>
Branches:
master
Children:
34e6ae62
Parents:
87acb61e
git-author:
Masahiro Yamada <yamada.masahiro@…> (02/12/16 05:45:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/19/18 05:01:08)
Message:

libfdt: simplify fdt_node_check_compatible()

Because fdt_stringlist_contains() returns 1 or 0,
fdt_node_check_compatible() can just return the inverted value.

Signed-off-by: Masahiro Yamada <yamada.masahiro@…>
Signed-off-by: David Gibson <david@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/dtc/libfdt/fdt_ro.c

    r87acb61e r0ddfe029  
    648648        if (!prop)
    649649                return len;
    650         if (fdt_stringlist_contains(prop, len, compatible))
    651                 return 0;
    652         else
    653                 return 1;
     650
     651        return !fdt_stringlist_contains(prop, len, compatible);
    654652}
    655653
Note: See TracChangeset for help on using the changeset viewer.