mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-04 12:08:26 +00:00
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>
This commit is contained in:
parent
ee7c2b27ea
commit
fe92347b9f
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ static int __fixup_find_domain_offset(void *fdt, int doff, void *p)
|
||||||
{
|
{
|
||||||
struct __fixup_find_domain_offset_info *fdo = 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;
|
*fdo->doffset = doff;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue