mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
MIPS: sgi-ip32: Replace deprecated strcpy() in plat_mem_setup()
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:
committed by
Thomas Bogendoerfer
parent
e5a6d4a23a
commit
5cd39d00c2
@@ -14,6 +14,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/mipsregs.h>
|
||||
@@ -90,7 +91,7 @@ void __init plat_mem_setup(void)
|
||||
static char options[8] __initdata;
|
||||
char *baud = ArcGetEnvironmentVariable("dbaud");
|
||||
if (baud)
|
||||
strcpy(options, baud);
|
||||
strscpy(options, baud);
|
||||
add_preferred_console("ttyS", *(con + 1) == '2' ? 1 : 0,
|
||||
baud ? options : NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user