diff options
author | Daniel Schaefer <daniel.schaefer@hpe.com> | 2021-05-19 15:54:10 +0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2021-05-19 17:35:38 +0530 |
commit | fe92347b9f91c147b314065cc3c2c2b196c55b34 (patch) | |
tree | 2b1096b71555b1a4289ffbccd98b639f01b05af3 /lib/utils | |
parent | ee7c2b27ea8d875db8d7d39116432d9958267415 (diff) |
lib: utils/fdt: Replace strcmp with strncmp
Use strncmp() instead of strcmp() in __fixup_find_domain_offset()
so that it compiles fine when linking with external firmware (such
as EDK2).
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Abner Chang <abner.chang@hpe.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/fdt/fdt_domain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/fdt/fdt_domain.c b/lib/utils/fdt/fdt_domain.c index fc8ad42..676c757 100644 --- a/lib/utils/fdt/fdt_domain.c +++ b/lib/utils/fdt/fdt_domain.c @@ -96,7 +96,7 @@ static int __fixup_find_domain_offset(void *fdt, int doff, void *p) { struct __fixup_find_domain_offset_info *fdo = p; - if (!strcmp(fdo->name, fdt_get_name(fdt, doff, NULL))) + if (!strncmp(fdo->name, fdt_get_name(fdt, doff, NULL), strlen(fdo->name))) *fdo->doffset = doff; return 0; |