diff options
| author | Ben Whitten <[email protected]> | 2015-12-30 13:05:58 +0000 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2016-01-14 22:11:34 -0500 |
| commit | 192bc6948b02ff4168cab16162fffb507946dc2b (patch) | |
| tree | b49cf85a3fa910182ce7dc2508f00ccb8ade03d4 /drivers/net/ldpaa_eth | |
| parent | 4edde96111aefac63d6aaca6ba87a90d149e973e (diff) | |
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 <[email protected]>
Acked-by: Wolfgang Denk <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'drivers/net/ldpaa_eth')
| -rw-r--r-- | drivers/net/ldpaa_eth/ldpaa_eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index 69530b11cf1..3857122bd05 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -628,11 +628,11 @@ static int ldpaa_dpmac_bind(struct ldpaa_eth_priv *priv) #endif memset(&dpmac_endpoint, 0, sizeof(struct dprc_endpoint)); - sprintf(dpmac_endpoint.type, "dpmac"); + strcpy(dpmac_endpoint.type, "dpmac"); dpmac_endpoint.id = priv->dpmac_id; memset(&dpni_endpoint, 0, sizeof(struct dprc_endpoint)); - sprintf(dpni_endpoint.type, "dpni"); + strcpy(dpni_endpoint.type, "dpni"); dpni_endpoint.id = dflt_dpni->dpni_id; err = dprc_connect(dflt_mc_io, MC_CMD_NO_FLAGS, |
