From: roel kluin Date: Tue, 21 Jul 2009 00:17:17 +0000 (+0000) Subject: powerpc/cell: Replace strncpy by strlcpy X-Git-Tag: v3.12-rc1~13353^2~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e2ddb24d36106e029f6eeb3df611178a36fb295;p=kernel%2Fkernel-generic.git powerpc/cell: Replace strncpy by strlcpy Replace strncpy() and explicit null-termination by strlcpy() Signed-off-by: Roel Kluin Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c index 07c234f..e538455 100644 --- a/arch/powerpc/platforms/cell/celleb_setup.c +++ b/arch/powerpc/platforms/cell/celleb_setup.c @@ -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; }