forked from Mirrors/opensbi
		
	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:
		
				
					committed by
					
						
						Anup Patel
					
				
			
			
				
	
			
			
			
						parent
						
							ee7c2b27ea
						
					
				
				
					commit
					fe92347b9f
				
			@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user