Commit 2e2ddb24 authored by roel kluin's avatar roel kluin Committed by Benjamin Herrenschmidt

powerpc/cell: Replace strncpy by strlcpy

Replace strncpy() and explicit null-termination by strlcpy()
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent c5a8c0c9
......@@ -80,8 +80,7 @@ static void celleb_show_cpuinfo(struct seq_file *m)
static int __init celleb_machine_type_hack(char *ptr)
{
strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type));
celleb_machine_type[sizeof(celleb_machine_type)-1] = 0;
strlcpy(celleb_machine_type, ptr, sizeof(celleb_machine_type));
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment