summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-11-22 22:14:06 -0500
committerTom Rini <[email protected]>2022-11-22 22:14:06 -0500
commit19fb8d7945fcd83828986ac48db74560b26611f9 (patch)
treed65ad8a81d6e62d2786e40186769b48d07280303 /cmd
parent521277ec15eb794229403ec24b8c00a4ff02b0b6 (diff)
parentb4574c0e750bee39cc2448952f127040a37a8e0b (diff)
Merge tag 'dm-pull-22nov22' of https://source.denx.de/u-boot/custodians/u-boot-dm
buildman /binman improvements for handling missing blobs fix for long-standing image.h warning minor fixes
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fdt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 4b2dcfec863..8e51a431261 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -60,11 +60,14 @@ static int fdt_value_env_set(const void *nodep, int len,
* Iterate over all members in stringlist and find the one at
* offset $index. If no such index exists, indicate failure.
*/
- for (i = 0; i < len; i += strlen(nodec) + 1) {
- if (index-- > 0)
+ for (i = 0; i < len; ) {
+ if (index-- > 0) {
+ i += strlen(nodec) + 1;
+ nodec += strlen(nodec) + 1;
continue;
+ }
- env_set(var, nodec + i);
+ env_set(var, nodec);
return 0;
}