diff options
author | Daniel Schaefer <daniel.schaefer@hpe.com> | 2021-05-19 10:54:10 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2021-05-19 15:05:38 +0300 |
commit | fe92347b9f91c147b314065cc3c2c2b196c55b34 (patch) | |
tree | 2b1096b71555b1a4289ffbccd98b639f01b05af3 /lib/utils/fdt | |
parent | ee7c2b27ea8d875db8d7d39116432d9958267415 (diff) | |
download | opensbi-fe92347b9f91c147b314065cc3c2c2b196c55b34.tar.xz |
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/fdt')
-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; |