aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-07-21 00:17:17 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-20 10:12:29 +1000
commit2e2ddb24d36106e029f6eeb3df611178a36fb295 (patch)
tree7c76d5f2d43933a86cd834c8b28290d9c501cdae /arch
parentc5a8c0c99f67ae8a784faafbaaea1529825796e2 (diff)
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')
-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 07c234f6b2b..e5384557977 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;
}