diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-10-29 22:54:09 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-11-11 19:36:42 +1100 |
commit | 7975f6422260af4ac7ae2fcdff0ef2a6e391ab71 (patch) | |
tree | b8ea452fcf138b59d6ccb897e582e44e2cd371a0 /tests/pci-bridge-bad2.dts | |
parent | fca296445eabf3cfe986e89dd8711c0be583036d (diff) | |
download | dtc-7975f6422260af4ac7ae2fcdff0ef2a6e391ab71.zip dtc-7975f6422260af4ac7ae2fcdff0ef2a6e391ab71.tar.gz dtc-7975f6422260af4ac7ae2fcdff0ef2a6e391ab71.tar.bz2 |
Fix widespread incorrect use of strneq(), replace with new strprefixeq()
Every remaining usage of strneq() is, in fact, incorrect. They're trying
to check that the first n characters of one string exactly match another
string. But, they fall into the classic trap of strncmp() on which
strneq() is based. If n is less than the length of the second string, they
only check that the first string matches the start of the second, not the
whole of it.
To fix this, remove strneq() and replace it with a strprefixeq() function
which does what we want here.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/pci-bridge-bad2.dts')
0 files changed, 0 insertions, 0 deletions