diff options
| author | Daniel Schaefer <[email protected]> | 2021-05-19 15:54:10 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2021-05-19 17:35:38 +0530 |
| commit | fe92347b9f91c147b314065cc3c2c2b196c55b34 (patch) | |
| tree | 2b1096b71555b1a4289ffbccd98b639f01b05af3 | |
| 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 <[email protected]>
Reviewed-by: Xiang W <[email protected]>
Reviewed-by: Abner Chang <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -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 fc8ad423..676c7579 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; |
