aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2016-06-27 14:12:15 +0800
committerAlex Shi <alex.shi@linaro.org>2016-06-27 15:15:12 +0800
commit4684adf63e309c551bada19d39068a0f83d49f42 (patch)
tree1f605045801ddab19bed954d03c2ea34a7c509a7 /scripts
parente31e93969c75a4ffc43f88e60b42ae519e115791 (diff)
scripts/dtc: Update to upstream version 9d3649bd3be245c9
commit 4760597116e34bd58f670d008ae7323653268fb4 upstream I remove the needless code according the dependence. Sync dtc with upstream as of commit 9d3649bd3be2 (Add testcases for fdt_path_offset_namelen()). Signed-off-by: Rob Herring <robh@kernel.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: devicetree@vger.kernel.org Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dtc/libfdt/fdt_ro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c
index 02b6d687537f..067c7acff61b 100644
--- a/scripts/dtc/libfdt/fdt_ro.c
+++ b/scripts/dtc/libfdt/fdt_ro.c
@@ -164,7 +164,7 @@ int fdt_path_offset(const void *fdt, const char *path)
/* see if we have an alias */
if (*path != '/') {
- const char *q = strchr(path, '/');
+ const char *q = memchr(path, '/', end - p);
if (!q)
q = end;
@@ -184,7 +184,7 @@ int fdt_path_offset(const void *fdt, const char *path)
p++;
if (! *p)
return offset;
- q = strchr(p, '/');
+ q = memchr(p, '/', end - p);
if (! q)
q = end;