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 <ben.whitten@gmail.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c
index 422c069..dab1958 100644
--- a/common/cmd_mtdparts.c
+++ b/common/cmd_mtdparts.c
@@ -1086,7 +1086,7 @@
return 0;
}
- sprintf(p, "mtdparts=");
+ strcpy(p, "mtdparts=");
p += 9;
list_for_each(dentry, &devices) {