From 192bc6948b02ff4168cab16162fffb507946dc2b Mon Sep 17 00:00:00 2001 From: Ben Whitten Date: Wed, 30 Dec 2015 13:05:58 +0000 Subject: Fix GCC format-security errors and convert sprintfs. With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal. Simple uses of sprintf are also converted to use strcpy. Signed-off-by: Ben Whitten Acked-by: Wolfgang Denk Reviewed-by: Tom Rini --- board/freescale/b4860qds/eth_b4860qds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'board/freescale/b4860qds/eth_b4860qds.c') diff --git a/board/freescale/b4860qds/eth_b4860qds.c b/board/freescale/b4860qds/eth_b4860qds.c index df90476a77..4b2303e849 100644 --- a/board/freescale/b4860qds/eth_b4860qds.c +++ b/board/freescale/b4860qds/eth_b4860qds.c @@ -408,22 +408,22 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr, sizeof(f_link)); break; case 0x98: /* XAUI interface */ - sprintf(alias, "phy_xaui_slot1"); + strcpy(alias, "phy_xaui_slot1"); fdt_status_okay_by_alias(fdt, alias); - sprintf(alias, "phy_xaui_slot2"); + strcpy(alias, "phy_xaui_slot2"); fdt_status_okay_by_alias(fdt, alias); break; case 0x9e: /* XAUI interface */ case 0x9a: case 0x93: case 0x91: - sprintf(alias, "phy_xaui_slot1"); + strcpy(alias, "phy_xaui_slot1"); fdt_status_okay_by_alias(fdt, alias); break; case 0x97: /* XAUI interface */ case 0xc3: - sprintf(alias, "phy_xaui_slot2"); + strcpy(alias, "phy_xaui_slot2"); fdt_status_okay_by_alias(fdt, alias); break; default: -- cgit