mirror of https://github.com/torvalds/linux.git
MIPS: generic: Replace deprecated strcpy() in ocelot_detect()
strcpy() is deprecated; use strscpy() instead. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
e34b690f58
commit
6a1e6bf933
|
|
@ -4,6 +4,7 @@
|
|||
*
|
||||
* Copyright (c) 2017 Microsemi Corporation
|
||||
*/
|
||||
#include <linux/string.h>
|
||||
#include <asm/machine.h>
|
||||
#include <asm/prom.h>
|
||||
|
||||
|
|
@ -41,7 +42,7 @@ static __init bool ocelot_detect(void)
|
|||
|
||||
if (prom_argc > 1 && strlen(prom_argv[1]) > 0)
|
||||
/* ignore all built-in args if any f/w args given */
|
||||
strcpy(arcs_cmdline, prom_argv[1]);
|
||||
strscpy(arcs_cmdline, prom_argv[1]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue