summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-07-21 04:17:17 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-20 04:12:29 +0400
commit2e2ddb24d36106e029f6eeb3df611178a36fb295 (patch)
tree7c76d5f2d43933a86cd834c8b28290d9c501cdae /arch/powerpc/platforms
parentc5a8c0c99f67ae8a784faafbaaea1529825796e2 (diff)
downloadlinux-2e2ddb24d36106e029f6eeb3df611178a36fb295.tar.xz
powerpc/cell: Replace strncpy by strlcpy
Replace strncpy() and explicit null-termination by strlcpy() Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/celleb_setup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c
index 07c234f6b2b6..e53845579770 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;
}